GNU bug report logs - #58623
[PATCH 0/3] import/cran: Parameterize for guix-cran.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Lars-Dominik Braun <lars@HIDDEN>; Keywords: patch; dated Wed, 19 Oct 2022 09:30:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 58623 <at> debbugs.gnu.org:


Received: (at 58623) by debbugs.gnu.org; 2 Nov 2022 18:25:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 02 14:25:48 2022
Received: from localhost ([127.0.0.1]:47175 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oqIQt-00066z-IK
	for submit <at> debbugs.gnu.org; Wed, 02 Nov 2022 14:25:47 -0400
Received: from mail-wr1-f41.google.com ([209.85.221.41]:44587)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1oqIQq-00066E-Sg
 for 58623 <at> debbugs.gnu.org; Wed, 02 Nov 2022 14:25:45 -0400
Received: by mail-wr1-f41.google.com with SMTP id v1so25743729wrt.11
 for <58623 <at> debbugs.gnu.org>; Wed, 02 Nov 2022 11:25:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id
 :reply-to; bh=3LcV3TfT5aknrMYNBTeAXX09JaVgRf0yTS/T5uKDfPg=;
 b=Y7yYDik/qxMF/EyOIBaPTQodmiqfPkBmXzTVhxXtfZllvJgSvAf9JEI6JE5KyzUivE
 YzF5pyamLxJZ9dgEdYtmbi8SDpwM3KFCYTI0fPCkYd0lXM+lynYxSKGVbVOIL70dfPKc
 +uUB4qPHx1sRYN/Q7GlIp3P5QzWQ7wq3vTIZIO4g115nHZFTgu1QvDzH7sl8y5WqSdt8
 /3cGsKieEieQpgDHXkk/rHFG2bjxO9XZ0h05UcgWzvq8uh9M626Ak7p87BmitMdr0V3r
 6rUiGE5t6eu4h2O37cRYEj4mxxwFf67blvzXwzeFJmIR66adbmWI70/VBsTa+Qugx0yX
 o67A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=3LcV3TfT5aknrMYNBTeAXX09JaVgRf0yTS/T5uKDfPg=;
 b=3nqJhMqu4cmi034dslbP+icIYRRFzLl7Tvu0ApoNN01FmuHwdT1IYCJaLQ+lvpD/CJ
 cq7EOlAQGs3p6e3V7DkgGOyUzKx1iXe494e16AhcbYUttahF9IMYfT+ENLqmSYXMVAJ1
 0LnZ+PeXG5CG9N1xaGAoa40VkLxSOcuhQngcMJrxF0stIFsZuwElidDPpXBoH5Pv6hxC
 neqJu/Ju6zupT1CnAkHUv72Mi3HB2G2s1uLPjKyBgJvRvFtFrryjrVxlCmn/XazVCgcz
 pEOdj1vDPF4nnWdN9lV85tIcdJSX+qqX11GbTcTmalqUryq2p+iocR8BdGfURhzKn+q2
 IStg==
X-Gm-Message-State: ACrzQf30JaZhPS3ybr20/F0J3Zfna9uCa4URvLUNCC4/HVUjoCGOwP3h
 acfNxOMGW1lQ4MLhlgsDggKMYdjeDmw=
X-Google-Smtp-Source: AMsMyM6m0Drc3LMP1PUw+EM0dV2w/nCBVtA5QvCx3DN14JHAplbN0WFACLalQQv2r3QVFaaLnhS72A==
X-Received: by 2002:a5d:6a81:0:b0:236:65a0:e7d9 with SMTP id
 s1-20020a5d6a81000000b0023665a0e7d9mr16177983wru.327.1667413539190; 
 Wed, 02 Nov 2022 11:25:39 -0700 (PDT)
Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id
 f7-20020adff987000000b00236722ebe66sm13184480wrr.75.2022.11.02.11.25.38
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 02 Nov 2022 11:25:38 -0700 (PDT)
From: zimoun <zimon.toutoune@HIDDEN>
To: Lars-Dominik Braun <lars@HIDDEN>, 58623 <at> debbugs.gnu.org
Subject: Re: [bug#58623] [PATCH 0/3] import/cran: Parameterize for guix-cran.
In-Reply-To: <Y0/DVVjwYCtiDRxd@HIDDEN>
References: <Y0/DVVjwYCtiDRxd@HIDDEN>
Date: Wed, 02 Nov 2022 19:25:23 +0100
Message-ID: <8735b1b4do.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 2.0 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Hi Lars, On mer., 19 oct. 2022 at 11:28, Lars-Dominik Braun
 wrote: > the attached patches are required for guix-cran >
 (https://github.com/guix-science/guix-cran).
 import/cran already has the > ability to add a prefix to licenses, but it
 was not exposed. Additionally [...] 
 Content analysis details:   (2.0 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.221.41 listed in wl.mailspike.net]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.221.41 listed in list.dnswl.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
 [URI: jpoiret.xyz (xyz)]
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (zimon.toutoune[at]gmail.com)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
X-Debbugs-Envelope-To: 58623
Cc: Ricardo Wurmus <rekado@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>,
 ludo@HIDDEN, Christopher Baines <mail@HIDDEN>,
 Josselin Poiret <dev@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

Hi Lars,

On mer., 19 oct. 2022 at 11:28, Lars-Dominik Braun <lars@HIDDEN> wrote:

> the attached patches are required for guix-cran
> (https://github.com/guix-science/guix-cran). import/cran already has the
> ability to add a prefix to licenses, but it was not exposed. Additionally
> I need to parameterize fetch/download functions, so I can cache the
> tarballs/DESCRIPTION files.

This is really cool!  Thanks for working on that.


> Subject: [PATCH 1/3] import/cran: Allow custom license prefix.
> X-Debbugs-Cc: zimon.toutoune@HIDDEN
> X-Debbugs-Cc: dev@HIDDEN
> X-Debbugs-Cc: mail@HIDDEN
> X-Debbugs-Cc: rekado@HIDDEN
> X-Debbugs-Cc: othacehe@HIDDEN
> X-Debbugs-Cc: ludo@HIDDEN

Because the patch had been sent as attachment, I have not received this
X-Debbugs-CC, IIRC.  Well, I have added these CC.


> * guix/import/cran.scm (%license-prefix): New parameter.
> (string->license): Use it.
> * guix/scripts/import/cran.scm (%options): Add new parameter -p/--license=
-prefix.
> (show-help): Document it.
> (parse-options): Pass it as a parameter to importer.

LGTM.  Maybe a line in the manual could help.


> Subject: [PATCH 2/3] import/cran: Allow overriding description fetch func=
tion.
>
> * guix/import/cran.scm (%fetch-description): New parameter.
> (cran->guix-package): Use it.
> (upstream-name): Use it.

[...]

> Subject: [PATCH 3/3] import/cran: Allow overriding tarball download.
>
> * guix/import/cran.scm (%download-source): New parameter.
> (description->package): Use it.
> ---
>  guix/import/cran.scm | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)

Well, I miss what it changes =E2=80=93 I have nothing special to comment, so
LGTM. :-)


Cheers,
simon




Information forwarded to guix-patches@HIDDEN:
bug#58623; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 19 Oct 2022 09:29:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 19 05:29:24 2022
Received: from localhost ([127.0.0.1]:55828 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ol5O4-0002Bb-PY
	for submit <at> debbugs.gnu.org; Wed, 19 Oct 2022 05:29:24 -0400
Received: from lists.gnu.org ([209.51.188.17]:57842)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <lars@HIDDEN>) id 1ol5O0-0002BS-K6
 for submit <at> debbugs.gnu.org; Wed, 19 Oct 2022 05:29:20 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:50344)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <lars@HIDDEN>) id 1ol5O0-0002i3-ET
 for guix-patches@HIDDEN; Wed, 19 Oct 2022 05:29:16 -0400
Received: from mout-p-202.mailbox.org ([2001:67c:2050:0:465::202]:47726)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256)
 (Exim 4.90_1) (envelope-from <lars@HIDDEN>) id 1ol5Nv-0002ME-1P
 for guix-patches@HIDDEN; Wed, 19 Oct 2022 05:29:16 -0400
Received: from smtp1.mailbox.org (smtp1.mailbox.org
 [IPv6:2001:67c:2050:b231:465::1])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest
 SHA256) (No client certificate requested)
 by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4Mslm66ptPz9sRK
 for <guix-patches@HIDDEN>; Wed, 19 Oct 2022 11:28:54 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6xq.net; s=MBO0001;
 t=1666171734;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type;
 bh=IY97NhsoWi9hmGUYa+SiV/6gKD8n3vPyRyINtcyMcvA=;
 b=dJymWNasCEcBShVHgHdIh8l7Cl2i5GZDxIVIC9bxHZe12Z1D8jZQsl2uCmS6evwGnKvrjr
 nwNaXgeuJgxtGSz7MlhDgcuz+M4u5ZW3PkRuwX2NmNrXFTqk0lZKsQpPV7rEU7n7/xvnVz
 z4kKBjIeNCDyQHirpiBAiibTWxccThQf02MLwKDDz6oNuffBcJmSnRcLqmjZjFxQAjfU20
 63CrmSsnzyTzp01N3Sw2i4NWwvT56z4DTdC2liMNZd/iEWBoCXIjvJjkxMBr7qkZqEP1wU
 Q0lX1Rr4kV9eEBQC5DhQP8Yfme7tBe7GbetuYnXXGWJ4of7zXgAi2EUyGDpUoQ==
Date: Wed, 19 Oct 2022 11:28:53 +0200
From: Lars-Dominik Braun <lars@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 0/3] import/cran: Parameterize for guix-cran.
Message-ID: <Y0/DVVjwYCtiDRxd@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="jRC6WZhafm+9bWxP"
Content-Disposition: inline
X-Debbugs-Cc: zimon.toutoune@HIDDEN
X-Debbugs-Cc: dev@HIDDEN
X-Debbugs-Cc: mail@HIDDEN
X-Debbugs-Cc: rekado@HIDDEN
X-Debbugs-Cc: othacehe@HIDDEN
X-Debbugs-Cc: ludo@HIDDEN
X-Rspamd-Queue-Id: 4Mslm66ptPz9sRK
Received-SPF: pass client-ip=2001:67c:2050:0:465::202;
 envelope-from=lars@HIDDEN; helo=mout-p-202.mailbox.org
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)


--jRC6WZhafm+9bWxP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

the attached patches are required for guix-cran
(https://github.com/guix-science/guix-cran). import/cran already has the
ability to add a prefix to licenses, but it was not exposed. Additionally
I need to parameterize fetch/download functions, so I can cache the
tarballs/DESCRIPTION files.

Cheers,
Lars


Lars-Dominik Braun (3):
  import/cran: Allow custom license prefix.
  import/cran: Allow overriding description fetch function.
  import/cran: Allow overriding tarball download.

 guix/import/cran.scm         | 30 +++++++++++++++++++++---------
 guix/scripts/import/cran.scm | 18 ++++++++++++++++--
 2 files changed, 37 insertions(+), 11 deletions(-)

-- 
2.37.3


--jRC6WZhafm+9bWxP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment;
	filename="0001-import-cran-Allow-custom-license-prefix.patch"

From 758a4f70fda5758449747e14db1991f6243174b1 Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <lars@HIDDEN>
Date: Tue, 18 Oct 2022 12:45:15 +0200
Subject: [PATCH 1/3] import/cran: Allow custom license prefix.
X-Debbugs-Cc: zimon.toutoune@HIDDEN
X-Debbugs-Cc: dev@HIDDEN
X-Debbugs-Cc: mail@HIDDEN
X-Debbugs-Cc: rekado@HIDDEN
X-Debbugs-Cc: othacehe@HIDDEN
X-Debbugs-Cc: ludo@HIDDEN

* guix/import/cran.scm (%license-prefix): New parameter.
(string->license): Use it.
* guix/scripts/import/cran.scm (%options): Add new parameter -p/--license-prefix.
(show-help): Document it.
(parse-options): Pass it as a parameter to importer.
---
 guix/import/cran.scm         | 10 +++++++---
 guix/scripts/import/cran.scm | 18 ++++++++++++++++--
 2 files changed, 23 insertions(+), 5 deletions(-)

diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index 17e33d5f52..d13231f633 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -55,6 +55,7 @@ (define-module (guix import cran)
   #:use-module (guix packages)
   #:use-module (gnu packages)
   #:export (%input-style
+            %license-prefix
 
             cran->guix-package
             bioconductor->guix-package
@@ -82,6 +83,9 @@ (define-module (guix import cran)
 (define %input-style
   (make-parameter 'variable)) ; or 'specification
 
+(define %license-prefix
+  (make-parameter identity))
+
 (define (string->licenses license-string)
   (let ((licenses
          (map string-trim-both
@@ -89,9 +93,9 @@ (define (string->licenses license-string)
                                (char-set-complement (char-set #\|))))))
     (string->license licenses)))
 
-(define string->license
-  (let ((prefix identity))
-    (match-lambda
+(define (string->license license-string)
+  (let ((prefix (%license-prefix)))
+    (match license-string
       ("AGPL-3" (prefix 'agpl3))
       ("AGPL (>= 3)" (prefix 'agpl3+))
       ("Artistic-2.0" (prefix 'artistic2.0))
diff --git a/guix/scripts/import/cran.scm b/guix/scripts/import/cran.scm
index 2934d4300a..3186bf9248 100644
--- a/guix/scripts/import/cran.scm
+++ b/guix/scripts/import/cran.scm
@@ -53,6 +53,9 @@ (define (show-help)
   (display (G_ "
   -s, --style=STYLE      choose output style, either specification or variable"))
   (display (G_ "
+  -p, --license-prefix=PREFIX
+                         add custom prefix to licenses, useful for prefixed import of (guix licenses)"))
+  (display (G_ "
   -V, --version          display version information and exit"))
   (newline)
   (show-bug-report-information))
@@ -74,6 +77,10 @@ (define %options
                  (lambda (opt name arg result)
                    (alist-cons 'style (string->symbol arg)
                                (alist-delete 'style result))))
+         (option '(#\p "license-prefix") #t #f
+                 (lambda (opt name arg result)
+                   (alist-cons 'license-prefix arg
+                               (alist-delete 'license-prefix result))))
          (option '(#\r "recursive") #f #f
                  (lambda (opt name arg result)
                    (alist-cons 'recursive #t result)))
@@ -95,8 +102,15 @@ (define (parse-options)
                             (('argument . value)
                              value)
                             (_ #f))
-                           (reverse opts))))
-    (parameterize ((%input-style (assoc-ref opts 'style)))
+                           (reverse opts)))
+         (prefix (assoc-ref opts 'license-prefix))
+         (prefix-proc (if (string? prefix)
+                        (lambda (symbol)
+                          (string->symbol
+                            (string-append prefix (symbol->string symbol))))
+                        identity)))
+    (parameterize ((%input-style (assoc-ref opts 'style))
+                   (%license-prefix prefix-proc))
       (match args
         ((spec)
          (let ((name version (package-name->name+version spec)))
-- 
2.37.3


--jRC6WZhafm+9bWxP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment;
	filename="0002-import-cran-Allow-overriding-description-fetch-funct.patch"

From 19b0e079f409b90a51620454a1d3026d379c3fb1 Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <lars@HIDDEN>
Date: Tue, 18 Oct 2022 12:45:45 +0200
Subject: [PATCH 2/3] import/cran: Allow overriding description fetch function.
X-Debbugs-Cc: zimon.toutoune@HIDDEN
X-Debbugs-Cc: dev@HIDDEN
X-Debbugs-Cc: mail@HIDDEN
X-Debbugs-Cc: rekado@HIDDEN
X-Debbugs-Cc: othacehe@HIDDEN
X-Debbugs-Cc: ludo@HIDDEN

* guix/import/cran.scm (%fetch-description): New parameter.
(cran->guix-package): Use it.
(upstream-name): Use it.
---
 guix/import/cran.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index d13231f633..05374b5317 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -56,6 +56,7 @@ (define-module (guix import cran)
   #:use-module (gnu packages)
   #:export (%input-style
             %license-prefix
+            %fetch-description
 
             cran->guix-package
             bioconductor->guix-package
@@ -350,6 +351,9 @@ (define* (fetch-description repository name #:optional version)
                               `(hg-changeset . ,changeset)
                               meta)))))))))
 
+(define %fetch-description
+  (make-parameter fetch-description))
+
 (define (listify meta field)
   "Look up FIELD in the alist META.  If FIELD contains a comma-separated
 string, turn it into a list and strip off parenthetic expressions.  Return the
@@ -640,7 +644,7 @@ (define cran->guix-package
    (lambda* (package-name #:key (repo 'cran) version)
      "Fetch the metadata for PACKAGE-NAME from REPO and return the `package'
 s-expression corresponding to that package, or #f on failure."
-     (let ((description (fetch-description repo package-name version)))
+     (let ((description ((%fetch-description) repo package-name version)))
        (if description
            (description->package repo description)
            (case repo
@@ -694,7 +698,7 @@ (define upstream-name
     (package->upstream-name pkg))
 
   (define meta
-    (fetch-description 'cran upstream-name))
+    ((%fetch-description) 'cran upstream-name))
 
   (and meta
        (let ((version (assoc-ref meta "Version")))
-- 
2.37.3


--jRC6WZhafm+9bWxP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment;
	filename="0003-import-cran-Allow-overriding-tarball-download.patch"

From 89e46f83c2a39a63326bb4faedf36fb678c03a03 Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <lars@HIDDEN>
Date: Tue, 18 Oct 2022 12:45:56 +0200
Subject: [PATCH 3/3] import/cran: Allow overriding tarball download.
X-Debbugs-Cc: zimon.toutoune@HIDDEN
X-Debbugs-Cc: dev@HIDDEN
X-Debbugs-Cc: mail@HIDDEN
X-Debbugs-Cc: rekado@HIDDEN
X-Debbugs-Cc: othacehe@HIDDEN
X-Debbugs-Cc: ludo@HIDDEN

* guix/import/cran.scm (%download-source): New parameter.
(description->package): Use it.
---
 guix/import/cran.scm | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index 05374b5317..2a12963532 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -57,6 +57,7 @@ (define-module (guix import cran)
   #:export (%input-style
             %license-prefix
             %fetch-description
+            %download-source
 
             cran->guix-package
             bioconductor->guix-package
@@ -265,6 +266,9 @@ (define download
             ;; of the URLs is the /Archive CRAN URL.
             (any (cut download-to-store store <>) urls)))))))))
 
+(define %download-source
+  (make-parameter download))
+
 (define (fetch-description-from-tarball url)
   "Fetch the tarball at URL, extra its 'DESCRIPTION' file, parse it, and
 return the resulting alist."
@@ -547,10 +551,10 @@ (define (description->package repository meta)
                           (_ #f)))))
          (git?       (if (assoc-ref meta 'git) #true #false))
          (hg?        (if (assoc-ref meta 'hg) #true #false))
-         (source     (download source-url #:method (cond
-                                                    (git? 'git)
-                                                    (hg? 'hg)
-                                                    (else #f))))
+         (source     ((%download-source) source-url #:method (cond
+                                                               (git? 'git)
+                                                               (hg? 'hg)
+                                                               (else #f))))
          (sysdepends (append
                       (if (needs-zlib? source (not (or git? hg?))) '("zlib") '())
                       (filter (lambda (name)
-- 
2.37.3


--jRC6WZhafm+9bWxP--




Acknowledgement sent to Lars-Dominik Braun <lars@HIDDEN>:
New bug report received and forwarded. Copy sent to ludo@HIDDEN, guix-patches@HIDDEN. Full text available.
Report forwarded to ludo@HIDDEN, guix-patches@HIDDEN:
bug#58623; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 2 Nov 2022 18:30:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.