GNU bug report logs - #49531
[PATCH core-updates 0/4] import: {utils, go, crate}: Emit new-style package inputs.

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: Sarah Morgensen <iskarian@HIDDEN>; Keywords: patch; dated Mon, 12 Jul 2021 05:36:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

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


Received: (at 49531) by debbugs.gnu.org; 21 Jul 2021 02:59:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 20 22:59:26 2021
Received: from localhost ([127.0.0.1]:35872 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m62SD-0005AQ-Sz
	for submit <at> debbugs.gnu.org; Tue, 20 Jul 2021 22:59:26 -0400
Received: from out0.migadu.com ([94.23.1.103]:10295)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iskarian@HIDDEN>) id 1m62SC-0005AG-0d
 for 49531 <at> debbugs.gnu.org; Tue, 20 Jul 2021 22:59:24 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1;
 t=1626836363;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=mgi+35eUW3nj7GAWadm97uw3eBJ/oBfgqCmxnZjGwaA=;
 b=jiEMUeLbvacClhv4AhjZkQ4T0eNRfEbEgy9D586bE+XKcCtzuvAyL95YgJs3kc9YK3Ped8
 QhFk4yXEiuZaITfqfulqp+6r282KF56X+m4+tt/I2VqcJfKgjn4eQ9a1ksP+0XmLeXFYmm
 dFX9L/j2GVQz8RAlRyCa1v4CrvVhJNY=
From: Sarah Morgensen <iskarian@HIDDEN>
To: 49531 <at> debbugs.gnu.org
Subject: [PATCH core-updates v2] import: go: Emit new-style package inputs.
Date: Tue, 20 Jul 2021 19:59:21 -0700
Message-Id: <21e16bafbc6af293e7916b92af8fa9ece38a7483.1626832035.git.iskarian@HIDDEN>
In-Reply-To: <cover.1626067919.git.iskarian@HIDDEN>
References: <cover.1626067919.git.iskarian@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Migadu-Auth-User: iskarian@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 49531
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.7 (-)

Since PACKAGE-NAMES->PACKAGE-INPUTS is used by both the go and crate
importers, give the crate importer a copy of the original so it
continues to use old-style inputs until it is updated.

* guix/import/utils.scm (package-names->package-inputs)[make-input]:
Return new-style package inputs.
(maybe-inputs): Wrap PACKAGE-INPUTS in 'list' instead of 'quasiquote'.
* guix/import/crate.scm (package-names->package-inputs): New variable.
* tests/go.scm ("go-module->guix-package"): Adjust to new-style package
inputs.
---
This patch narrows the scope to just the go importer; the crate importer can be
handled separately.

 guix/import/crate.scm | 18 ++++++++++++++++++
 guix/import/utils.scm | 13 ++++++-------
 tests/go.scm          |  2 +-
 3 files changed, 25 insertions(+), 8 deletions(-)

diff --git a/guix/import/crate.scm b/guix/import/crate.scm
index 287ffd2536..fa8f7bf096 100644
--- a/guix/import/crate.scm
+++ b/guix/import/crate.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@HIDDEN>
 ;;; Copyright © 2019, 2020 Martin Becze <mjbecze@HIDDEN>
 ;;; Copyright © 2021 Nicolas Goaziou <mail@HIDDEN>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -132,6 +133,23 @@ record or #f if it was not found."
 ;;; Converting crates to Guix packages.
 ;;;
 
+(define* (package-names->package-inputs names #:optional (output #f))
+  "Given a list of PACKAGE-NAMES or (PACKAGE-NAME VERSION) pairs, and an
+optional OUTPUT, tries to generate a quoted list of inputs, as suitable to
+use in an 'inputs' field of a package definition."
+  (define (make-input input version)
+    (cons* input (list 'unquote (string->symbol
+                                 (if version
+                                     (string-append input "-" version)
+                                     input)))
+           (or (and output (list output))
+               '())))
+
+  (map (match-lambda
+         ((input version) (make-input input version))
+         (input (make-input input #f)))
+       names))
+
 (define (maybe-cargo-inputs package-names)
   (match (package-names->package-inputs package-names)
     (()
diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index d817318a91..8fa017e18f 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2020 Helio Machado <0x2b3bfa0+guix@HIDDEN>
 ;;; Copyright © 2020 Martin Becze <mjbecze@HIDDEN>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@HIDDEN>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -237,12 +238,10 @@ into a proper sentence and by using two spaces between sentences."
 optional OUTPUT, tries to generate a quoted list of inputs, as suitable to
 use in an 'inputs' field of a package definition."
   (define (make-input input version)
-    (cons* input (list 'unquote (string->symbol
-                                 (if version
-                                     (string-append input "-" version)
-                                     input)))
-           (or (and output (list output))
-               '())))
+    (let ((name (if version (string-append input "-" version) input)))
+      (if output
+          (list (string->symbol name) output)
+          (string->symbol name))))
 
   (map (match-lambda
          ((input version) (make-input input version))
@@ -263,7 +262,7 @@ snippet generated is for regular inputs."
       (()
        '())
       ((package-inputs ...)
-       `((,field-name (,'quasiquote ,package-inputs)))))))
+       `((,field-name (list ,@package-inputs)))))))
 
 (define* (maybe-native-inputs package-names #:optional (output #f))
   "Same as MAYBE-INPUTS, but for native inputs."
diff --git a/tests/go.scm b/tests/go.scm
index 6749f4585f..743cffb023 100644
--- a/tests/go.scm
+++ b/tests/go.scm
@@ -389,7 +389,7 @@ require github.com/kr/pretty v0.2.1
      (arguments
       '(#:import-path "github.com/go-check/check"))
      (propagated-inputs
-      `(("go-github-com-kr-pretty" ,go-github-com-kr-pretty)))
+      (list go-github-com-kr-pretty))
      (home-page "https://github.com/go-check/check")
      (synopsis "Instructions")
      (description "Package check is a rich testing extension for Go's testing \

base-commit: b15c3dd9b0e9cf6858f730e1d46c35ed9ab6a758
-- 
2.31.1





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

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


Received: (at 49531) by debbugs.gnu.org; 20 Jul 2021 21:36:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 20 17:36:35 2021
Received: from localhost ([127.0.0.1]:35579 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m5xPm-0003fe-NA
	for submit <at> debbugs.gnu.org; Tue, 20 Jul 2021 17:36:34 -0400
Received: from eggs.gnu.org ([209.51.188.92]:52028)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1m5xPk-0003fM-9I
 for 49531 <at> debbugs.gnu.org; Tue, 20 Jul 2021 17:36:33 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:59406)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1m5xPf-0007tG-2M; Tue, 20 Jul 2021 17:36:27 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=45250 helo=ribbon)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1m5xPe-0003F2-Pp; Tue, 20 Jul 2021 17:36:27 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Sarah Morgensen <iskarian@HIDDEN>
Subject: Re: bug#49531: [PATCH core-updates 0/4] import: {utils, go, crate}:
 Emit new-style package inputs.
References: <cover.1626067919.git.iskarian@HIDDEN>
 <e04ca693d1e9c9899701ba8868db639949e3cd78.1626067919.git.iskarian@HIDDEN>
 <87sg08isu9.fsf_-_@HIDDEN>
Date: Tue, 20 Jul 2021 23:36:25 +0200
In-Reply-To: <87sg08isu9.fsf_-_@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s?=
 =?utf-8?Q?=22's?= message of "Tue, 20 Jul 2021 23:22:06 +0200")
Message-ID: <87czrcis6e.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49531
Cc: 49531 <at> debbugs.gnu.org
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: -3.3 (---)

Ludovic Court=C3=A8s <ludo@HIDDEN> skribis:

> Sarah Morgensen <iskarian@HIDDEN> skribis:
>
>> * guix/import/utils.scm (package-names->package-inputs)[make-input]:
>> Return new-style package inputs.
>> (maybe-inputs): Wrap PACKAGE-INPUTS in 'list' instead of 'quasiquote'.
>
> Applied this patch squeezed with patch #2, which adjusts tests/go.scm,
> because tests should be modified in the same commit (ideally, one should
> be able to take any commit and be sure that tests pass).

Actually no, I didn=E2=80=99t apply it in the end, because that=E2=80=99s t=
ied to the
Crate/Cargo changes as well.  :-/

Ludo=E2=80=99.




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

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


Received: (at 49531) by debbugs.gnu.org; 20 Jul 2021 21:29:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 20 17:29:22 2021
Received: from localhost ([127.0.0.1]:35555 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m5xIo-0003T4-J3
	for submit <at> debbugs.gnu.org; Tue, 20 Jul 2021 17:29:22 -0400
Received: from eggs.gnu.org ([209.51.188.92]:50674)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1m5xIn-0003Sr-JT
 for 49531 <at> debbugs.gnu.org; Tue, 20 Jul 2021 17:29:22 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:59220)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1m5xIh-0002zq-7R; Tue, 20 Jul 2021 17:29:15 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=45244 helo=ribbon)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1m5xIh-0007KS-06; Tue, 20 Jul 2021 17:29:15 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Sarah Morgensen <iskarian@HIDDEN>
Subject: Removing input labels for Rust #:cargo-inputs & co.?
References: <cover.1626067919.git.iskarian@HIDDEN>
 <598b53d80d66a229502d235507047a7717a15e8d.1626067919.git.iskarian@HIDDEN>
Date: Tue, 20 Jul 2021 23:29:13 +0200
In-Reply-To: <598b53d80d66a229502d235507047a7717a15e8d.1626067919.git.iskarian@HIDDEN>
 (Sarah Morgensen's message of "Sun, 11 Jul 2021 22:48:09 -0700")
Message-ID: <87lf60isie.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49531
Cc: 49531 <at> debbugs.gnu.org, Efraim Flashner <efraim@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: -3.3 (---)

Sarah Morgensen <iskarian@HIDDEN> skribis:

> Sanitize cargo's inputs here since the package field sanitizers don't
> know about them.
>
> * guix/packages.scm (sanitize-inputs): Export procedure.
> * guix/build-system/cargo.scm (package-cargo-inputs)
> (package-cargo-development-inputs)
> (lower): Sanitize inputs before using them.

So, do we want to do that?  :-)

I=E2=80=99d say yes, but what do Rust folks think?  (Efraim?)

Are labels of #:cargo-inputs & co. used at all?  If not, we can probably
go one step further and have sanitation remove input labels instead of
adding them.

And then, how do we handle the transition?  I=E2=80=99m not enthusiastic ab=
out
customizing =E2=80=98guix style=E2=80=99 for Rust packages; should we embar=
k on manual
changes of the 2.4K Rust packages?

> +++ b/guix/packages.scm
> @@ -7,6 +7,7 @@
>  ;;; Copyright =C2=A9 2019 Marius Bakke <mbakke@HIDDEN>
>  ;;; Copyright =C2=A9 2020, 2021 Maxim Cournoyer <maxim.cournoyer@HIDDEN=
om>
>  ;;; Copyright =C2=A9 2021 Chris Marusich <cmmarusich@HIDDEN>
> +;;; Copyright =C2=A9 2021 Sarah Morgensen <iskarian@HIDDEN>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -117,6 +118,7 @@
>              prepend                               ;syntactic keyword
>              replace                               ;syntactic keyword
>              modify-inputs
> +            sanitize-inputs

I=E2=80=99d rather not export it to make sure users don=E2=80=99t mistakenl=
y view it as
part of the public interface; it=E2=80=99s really just an internal helper.

Thanks,
Ludo=E2=80=99.




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

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


Received: (at 49531) by debbugs.gnu.org; 20 Jul 2021 21:22:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 20 17:22:15 2021
Received: from localhost ([127.0.0.1]:35543 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m5xBv-0003Hs-KC
	for submit <at> debbugs.gnu.org; Tue, 20 Jul 2021 17:22:15 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49540)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1m5xBu-0003Hg-2F
 for 49531 <at> debbugs.gnu.org; Tue, 20 Jul 2021 17:22:14 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:59124)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1m5xBo-0006mg-7n; Tue, 20 Jul 2021 17:22:08 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=45242 helo=ribbon)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1m5xBo-0001Kb-0V; Tue, 20 Jul 2021 17:22:08 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Sarah Morgensen <iskarian@HIDDEN>
Subject: Re: bug#49531: [PATCH core-updates 0/4] import: {utils, go, crate}:
 Emit new-style package inputs.
References: <cover.1626067919.git.iskarian@HIDDEN>
 <e04ca693d1e9c9899701ba8868db639949e3cd78.1626067919.git.iskarian@HIDDEN>
Date: Tue, 20 Jul 2021 23:22:06 +0200
In-Reply-To: <e04ca693d1e9c9899701ba8868db639949e3cd78.1626067919.git.iskarian@HIDDEN>
 (Sarah Morgensen's message of "Sun, 11 Jul 2021 22:48:06 -0700")
Message-ID: <87sg08isu9.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49531
Cc: 49531 <at> debbugs.gnu.org
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: -3.3 (---)

Hi,

Sarah Morgensen <iskarian@HIDDEN> skribis:

> * guix/import/utils.scm (package-names->package-inputs)[make-input]:
> Return new-style package inputs.
> (maybe-inputs): Wrap PACKAGE-INPUTS in 'list' instead of 'quasiquote'.

Applied this patch squeezed with patch #2, which adjusts tests/go.scm,
because tests should be modified in the same commit (ideally, one should
be able to take any commit and be sure that tests pass).

Thanks!

Ludo=E2=80=99.




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

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


Received: (at 49531) by debbugs.gnu.org; 12 Jul 2021 14:41:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 12 10:41:12 2021
Received: from localhost ([127.0.0.1]:38624 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m2x7Q-000534-19
	for submit <at> debbugs.gnu.org; Mon, 12 Jul 2021 10:41:12 -0400
Received: from out0.migadu.com ([94.23.1.103]:44451)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iskarian@HIDDEN>) id 1m2x7M-00052t-Tn
 for 49531 <at> debbugs.gnu.org; Mon, 12 Jul 2021 10:41:10 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1;
 t=1626100867;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=HNKJNQEyGRwjOOWc2CMWCiJM7xoebcyBNrqP8TEAX7U=;
 b=T6m1tvQq2NZ4ue+N4XKgei/1fpY/Ts2wnB8GmjjvLX3TyYteIbCVk70ny++6LPKx7CI9zs
 TKWILWTl8enCnptBU1kPt2vEU0r4ah1QbrUpGo+t45KwoI5opnJADq5GQ+5hm744Z0UO3V
 3Yd5Ac/qidtI6V9HQjbDaM0w6JkqC4U=
From: Sarah Morgensen <iskarian@HIDDEN>
To: 49531 <at> debbugs.gnu.org
Subject: [PATCH core-updates v2 3/4] import: crate: Emit new-style package
 inputs.
Date: Mon, 12 Jul 2021 07:41:04 -0700
Message-Id: <d9bea1dea220d8b9c400c2a5cb7b79120f65d50d.1626100499.git.iskarian@HIDDEN>
In-Reply-To: <ce265e07cfa82c00e65d65296089d3a00b451c08.1626067919.git.iskarian@HIDDEN>
References: <ce265e07cfa82c00e65d65296089d3a00b451c08.1626067919.git.iskarian@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Migadu-Auth-User: iskarian@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 49531
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.7 (-)

* guix/import/crate.scm (maybe-cargo-development-inputs)
(maybe-cargo-inputs): Wrap PACKAGE-INPUTS in unquoted 'list'.
* tests/crate.scm ("crate->guix-package")
("cargo-recursive-import")
("cargo-recursive-import-hoors-existing-packages"): Adjust accordingly.
---

Looks like I missed the version in the test inputs. The tests passed before too
though; it looks like the expected output (or at least the symbols in the
expected output) needs to be quoted in some way, or else match just takes any
value in that slot.

 guix/import/crate.scm |  5 +++--
 tests/crate.scm       | 30 +++++++++++-------------------
 2 files changed, 14 insertions(+), 21 deletions(-)

diff --git a/guix/import/crate.scm b/guix/import/crate.scm
index 287ffd2536..9c3bdfb9ab 100644
--- a/guix/import/crate.scm
+++ b/guix/import/crate.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@HIDDEN>
 ;;; Copyright © 2019, 2020 Martin Becze <mjbecze@HIDDEN>
 ;;; Copyright © 2021 Nicolas Goaziou <mail@HIDDEN>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -137,14 +138,14 @@ record or #f if it was not found."
     (()
      '())
     ((package-inputs ...)
-     `(#:cargo-inputs ,package-inputs))))
+     `(#:cargo-inputs (,'unquote (list ,@package-inputs))))))
 
 (define (maybe-cargo-development-inputs package-names)
   (match (package-names->package-inputs package-names)
     (()
      '())
     ((package-inputs ...)
-     `(#:cargo-development-inputs ,package-inputs))))
+     `(#:cargo-development-inputs (,'unquote (list ,@package-inputs))))))
 
 (define (maybe-arguments arguments)
   (match arguments
diff --git a/tests/crate.scm b/tests/crate.scm
index b6c3a7ee2e..f09a3f6628 100644
--- a/tests/crate.scm
+++ b/tests/crate.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2016 David Craven <david@HIDDEN>
 ;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@HIDDEN>
 ;;; Copyright © 2020 Martin Becze <mjbecze@HIDDEN>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -374,7 +375,7 @@
                        ('quasiquote
                         (#:skip-build? #t
                          #:cargo-inputs
-                         (("rust-leaf-alice" ('unquote 'rust-leaf-alice-0.7))))))
+                         ('unquote (list rust-leaf-alice-0.7)))))
                       (home-page "http://example.com")
                       (synopsis "summary")
                       (description "summary")
@@ -494,8 +495,7 @@
                 (arguments
                  ('quasiquote (#:skip-build? #t
                                #:cargo-inputs
-                               (("rust-leaf-bob"
-                                 ('unquote rust-leaf-bob-3))))))
+                               ('unquote (list rust-leaf-bob-3)))))
                 (home-page "http://example.com")
                 (synopsis "summary")
                 (description "summary")
@@ -517,12 +517,9 @@
                 (arguments
                  ('quasiquote (#:skip-build? #t
                                #:cargo-inputs
-                               (("rust-intermediate-b"
-                                 ('unquote rust-intermediate-b-1))
-                                ("rust-leaf-alice"
-                                 ('unquote 'rust-leaf-alice-0.7))
-                                ("rust-leaf-bob"
-                                 ('unquote rust-leaf-bob-3))))))
+                               ('unquote (list rust-intermediate-b-1
+                                               rust-leaf-alice-0.7
+                                               rust-leaf-bob-3)))))
                 (home-page "http://example.com")
                 (synopsis "summary")
                 (description "summary")
@@ -543,14 +540,10 @@
                 (build-system cargo-build-system)
                 (arguments
                  ('quasiquote (#:cargo-inputs
-                               (("rust-intermediate-a"
-                                 ('unquote rust-intermediate-a-1))
-                                ("rust-intermediate-b"
-                                 ('unquote rust-intermediate-b-1))
-                                ("rust-leaf-alice"
-                                 ('unquote 'rust-leaf-alice-0.7))
-                                ("rust-leaf-bob"
-                                 ('unquote rust-leaf-bob-3))))))
+                               ('unquote (list rust-intermediate-a-1
+                                               rust-intermediate-b-1
+                                               rust-leaf-alice-0.7
+                                               rust-leaf-bob-3)))))
                 (home-page "http://example.com")
                 (synopsis "summary")
                 (description "summary")
@@ -651,8 +644,7 @@
                 (build-system cargo-build-system)
                 (arguments
                  ('quasiquote (#:cargo-inputs
-                               (("rust-docopt"
-                                 ('unquote 'rust-docopt-0.8))))))
+                               ('unquote (list rust-docopt-0.8)))))
                 (home-page "http://example.com")
                 (synopsis "summary")
                 (description "summary")
-- 
2.31.1





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

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


Received: (at 49531) by debbugs.gnu.org; 12 Jul 2021 05:48:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 12 01:48:22 2021
Received: from localhost ([127.0.0.1]:36340 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m2onl-00040P-Pf
	for submit <at> debbugs.gnu.org; Mon, 12 Jul 2021 01:48:22 -0400
Received: from out2.migadu.com ([188.165.223.204]:32880)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iskarian@HIDDEN>) id 1m2onj-00040F-HG
 for 49531 <at> debbugs.gnu.org; Mon, 12 Jul 2021 01:48:20 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1;
 t=1626068898;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=mK7f3sHUfC7mUljkVEME5kFC1ft44dbXKM1L/rk+Bik=;
 b=jDk6+D83UPBBCkGM/jT9Hjnd1b6tpGZnZGUqEU3JoSTvrDdGxF2wos8dIxMBkRN5/ilBHY
 4cJ/Ke2XqsbMkS+1EKNg1zUGtweM/9pfupUDsQPWrdvfxHoIl5H5fY5Ggi2qA+FzO83/nW
 Jw1CIJu3At4uJujCXFaIqOKHxwfg58g=
From: Sarah Morgensen <iskarian@HIDDEN>
To: 49531 <at> debbugs.gnu.org
Subject: [PATCH core-updates 4/4] cargo-build-system: Accept new-style package
 inputs.
Date: Sun, 11 Jul 2021 22:48:09 -0700
Message-Id: <598b53d80d66a229502d235507047a7717a15e8d.1626067919.git.iskarian@HIDDEN>
In-Reply-To: <cover.1626067919.git.iskarian@HIDDEN>
References: <cover.1626067919.git.iskarian@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Migadu-Auth-User: iskarian@HIDDEN
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 49531
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 (-)

Sanitize cargo's inputs here since the package field sanitizers don't
know about them.

* guix/packages.scm (sanitize-inputs): Export procedure.
* guix/build-system/cargo.scm (package-cargo-inputs)
(package-cargo-development-inputs)
(lower): Sanitize inputs before using them.
---
 guix/build-system/cargo.scm | 9 ++++++---
 guix/packages.scm           | 2 ++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm
index 60c35eed07..a0aa9ad704 100644
--- a/guix/build-system/cargo.scm
+++ b/guix/build-system/cargo.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2019 Ivan Petkov <ivanppetkov@HIDDEN>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@HIDDEN>
 ;;; Copyright © 2021 Efraim Flashner <efraim@HIDDEN>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -128,13 +129,13 @@ to NAME and VERSION."
 (define (package-cargo-inputs p)
   (apply
     (lambda* (#:key (cargo-inputs '()) #:allow-other-keys)
-      cargo-inputs)
+      (sanitize-inputs cargo-inputs))
     (package-arguments p)))
 
 (define (package-cargo-development-inputs p)
   (apply
     (lambda* (#:key (cargo-development-inputs '()) #:allow-other-keys)
-      cargo-development-inputs)
+      (sanitize-inputs cargo-development-inputs))
     (package-arguments p)))
 
 (define (crate-closure inputs)
@@ -259,7 +260,9 @@ any dependent crates. This can be a benefits:
                         ,@(standard-packages)))
          (build-inputs `(("cargo" ,rust "cargo")
                          ("rustc" ,rust)
-                         ,@(expand-crate-sources cargo-inputs cargo-development-inputs)
+                         ,@(expand-crate-sources
+                            (sanitize-inputs cargo-inputs)
+                            (sanitize-inputs cargo-development-inputs))
                          ,@native-inputs))
          (outputs outputs)
          (build cargo-build)
diff --git a/guix/packages.scm b/guix/packages.scm
index dfb4c680be..56118edf16 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2019 Marius Bakke <mbakke@HIDDEN>
 ;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@HIDDEN>
 ;;; Copyright © 2021 Chris Marusich <cmmarusich@HIDDEN>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -117,6 +118,7 @@
             prepend                               ;syntactic keyword
             replace                               ;syntactic keyword
             modify-inputs
+            sanitize-inputs
 
             package-direct-sources
             package-transitive-sources
-- 
2.31.1





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

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


Received: (at 49531) by debbugs.gnu.org; 12 Jul 2021 05:48:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 12 01:48:21 2021
Received: from localhost ([127.0.0.1]:36338 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m2onl-00040N-A0
	for submit <at> debbugs.gnu.org; Mon, 12 Jul 2021 01:48:21 -0400
Received: from out2.migadu.com ([188.165.223.204]:32868)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iskarian@HIDDEN>) id 1m2onh-000400-EX
 for 49531 <at> debbugs.gnu.org; Mon, 12 Jul 2021 01:48:18 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1;
 t=1626068896;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=b9O0cmC5jvCpQoYElX2tWw2LsV2v9tUpGR6f8fQ+y6o=;
 b=jnTURbU8+rFfFha0qUHqiLIH0/ME5zoW1m84xaUM+kA3qYnFr5ezB/OEX35sPi1YRnaJWN
 OdDlpfji6orc6mWwGW5JFvbim85qK/PMEur8JNGJ+hY/b/elYOoeSvFItooCLTp8G+0x0a
 WfOenl4AqUXTM8HEes16UcFPH3ZTGkc=
From: Sarah Morgensen <iskarian@HIDDEN>
To: 49531 <at> debbugs.gnu.org
Subject: [PATCH core-updates 3/4] import: crate: Emit new-style package inputs.
Date: Sun, 11 Jul 2021 22:48:08 -0700
Message-Id: <ce265e07cfa82c00e65d65296089d3a00b451c08.1626067919.git.iskarian@HIDDEN>
In-Reply-To: <cover.1626067919.git.iskarian@HIDDEN>
References: <cover.1626067919.git.iskarian@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Migadu-Auth-User: iskarian@HIDDEN
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 49531
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 (-)

* guix/import/crate.scm (maybe-cargo-development-inputs)
(maybe-cargo-inputs): Wrap PACKAGE-INPUTS in unquoted 'list'.
* tests/crate.scm ("crate->guix-package")
("cargo-recursive-import")
("cargo-recursive-import-hoors-existing-packages"): Adjust accordingly.
---
 guix/import/crate.scm |  5 +++--
 tests/crate.scm       | 30 +++++++++++-------------------
 2 files changed, 14 insertions(+), 21 deletions(-)

diff --git a/guix/import/crate.scm b/guix/import/crate.scm
index 287ffd2536..9c3bdfb9ab 100644
--- a/guix/import/crate.scm
+++ b/guix/import/crate.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@HIDDEN>
 ;;; Copyright © 2019, 2020 Martin Becze <mjbecze@HIDDEN>
 ;;; Copyright © 2021 Nicolas Goaziou <mail@HIDDEN>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -137,14 +138,14 @@ record or #f if it was not found."
     (()
      '())
     ((package-inputs ...)
-     `(#:cargo-inputs ,package-inputs))))
+     `(#:cargo-inputs (,'unquote (list ,@package-inputs))))))
 
 (define (maybe-cargo-development-inputs package-names)
   (match (package-names->package-inputs package-names)
     (()
      '())
     ((package-inputs ...)
-     `(#:cargo-development-inputs ,package-inputs))))
+     `(#:cargo-development-inputs (,'unquote (list ,@package-inputs))))))
 
 (define (maybe-arguments arguments)
   (match arguments
diff --git a/tests/crate.scm b/tests/crate.scm
index b6c3a7ee2e..50b46aa871 100644
--- a/tests/crate.scm
+++ b/tests/crate.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2016 David Craven <david@HIDDEN>
 ;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@HIDDEN>
 ;;; Copyright © 2020 Martin Becze <mjbecze@HIDDEN>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -374,7 +375,7 @@
                        ('quasiquote
                         (#:skip-build? #t
                          #:cargo-inputs
-                         (("rust-leaf-alice" ('unquote 'rust-leaf-alice-0.7))))))
+                         ('unquote (list rust-leaf-alice)))))
                       (home-page "http://example.com")
                       (synopsis "summary")
                       (description "summary")
@@ -494,8 +495,7 @@
                 (arguments
                  ('quasiquote (#:skip-build? #t
                                #:cargo-inputs
-                               (("rust-leaf-bob"
-                                 ('unquote rust-leaf-bob-3))))))
+                               ('unquote (list rust-leaf-bob)))))
                 (home-page "http://example.com")
                 (synopsis "summary")
                 (description "summary")
@@ -517,12 +517,9 @@
                 (arguments
                  ('quasiquote (#:skip-build? #t
                                #:cargo-inputs
-                               (("rust-intermediate-b"
-                                 ('unquote rust-intermediate-b-1))
-                                ("rust-leaf-alice"
-                                 ('unquote 'rust-leaf-alice-0.7))
-                                ("rust-leaf-bob"
-                                 ('unquote rust-leaf-bob-3))))))
+                               ('unquote (list rust-intermediate-b
+                                               rust-leaf-alice
+                                               rust-leaf-bob)))))
                 (home-page "http://example.com")
                 (synopsis "summary")
                 (description "summary")
@@ -543,14 +540,10 @@
                 (build-system cargo-build-system)
                 (arguments
                  ('quasiquote (#:cargo-inputs
-                               (("rust-intermediate-a"
-                                 ('unquote rust-intermediate-a-1))
-                                ("rust-intermediate-b"
-                                 ('unquote rust-intermediate-b-1))
-                                ("rust-leaf-alice"
-                                 ('unquote 'rust-leaf-alice-0.7))
-                                ("rust-leaf-bob"
-                                 ('unquote rust-leaf-bob-3))))))
+                               ('unquote (list rust-intermediate-a
+                                               rust-intermediate-b
+                                               rust-leaf-alice
+                                               rust-leaf-bob)))))
                 (home-page "http://example.com")
                 (synopsis "summary")
                 (description "summary")
@@ -651,8 +644,7 @@
                 (build-system cargo-build-system)
                 (arguments
                  ('quasiquote (#:cargo-inputs
-                               (("rust-docopt"
-                                 ('unquote 'rust-docopt-0.8))))))
+                               ('unquote (list rust-docopt)))))
                 (home-page "http://example.com")
                 (synopsis "summary")
                 (description "summary")
-- 
2.31.1





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

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


Received: (at 49531) by debbugs.gnu.org; 12 Jul 2021 05:48:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 12 01:48:18 2021
Received: from localhost ([127.0.0.1]:36335 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m2oni-000402-25
	for submit <at> debbugs.gnu.org; Mon, 12 Jul 2021 01:48:18 -0400
Received: from out2.migadu.com ([188.165.223.204]:32859)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iskarian@HIDDEN>) id 1m2onf-0003zg-AV
 for 49531 <at> debbugs.gnu.org; Mon, 12 Jul 2021 01:48:15 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1;
 t=1626068894;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=vugO7+HO5fvHVwscvqJcXEcKGWl/S1DaFKMEYgyVY7I=;
 b=erZptyXN1FuVaDS1AoL5jVom9nohyWELcxKpbzsd9ZxB129mnDMgLIzJCt0OoPUczDnQ/+
 BmFjHq2ci/QCKApnQOYHqkowbl4HsmYOsm0ChiHpRyb9PUt5OxwSmDwBwASBAJIcSQyrhh
 1G6hRHnY9atzLdUvuRW1+2ZKH1eigFA=
From: Sarah Morgensen <iskarian@HIDDEN>
To: 49531 <at> debbugs.gnu.org
Subject: [PATCH core-updates 2/4] import: go: Emit new-style package inputs.
Date: Sun, 11 Jul 2021 22:48:07 -0700
Message-Id: <d3001f0a5b110f928f1e7d2116a43b24757635b4.1626067919.git.iskarian@HIDDEN>
In-Reply-To: <cover.1626067919.git.iskarian@HIDDEN>
References: <cover.1626067919.git.iskarian@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Migadu-Auth-User: iskarian@HIDDEN
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 49531
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 (-)

The actual change is completely contained in the previous import/utils
commit; this commit adjusts tests.

* tests/go.scm ("go-module->guix-package"): Adjust to new-style package
inputs.
---
 tests/go.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/go.scm b/tests/go.scm
index b088ab50d2..ae94a31425 100644
--- a/tests/go.scm
+++ b/tests/go.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright  2021 Franois Joulaud <francois.joulaud@HIDDEN>
+;;; Copyright  2021 Sarah Morgensen <iskarian@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -265,7 +266,7 @@ require github.com/kr/pretty v0.2.1
      (arguments
       '(#:import-path "github.com/go-check/check"))
      (propagated-inputs
-      `(("go-github-com-kr-pretty" ,go-github-com-kr-pretty)))
+      (list go-github-com-kr-pretty))
      (home-page "https://github.com/go-check/check")
      (synopsis "Instructions")
      (description "Package check is a rich testing extension for Go's testing \
-- 
2.31.1





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

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


Received: (at 49531) by debbugs.gnu.org; 12 Jul 2021 05:48:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 12 01:48:17 2021
Received: from localhost ([127.0.0.1]:36332 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m2ong-0003zt-Pi
	for submit <at> debbugs.gnu.org; Mon, 12 Jul 2021 01:48:17 -0400
Received: from out2.migadu.com ([188.165.223.204]:32839)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iskarian@HIDDEN>) id 1m2ond-0003zc-Nr
 for 49531 <at> debbugs.gnu.org; Mon, 12 Jul 2021 01:48:15 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1;
 t=1626068892;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=+ocm/OGlRdLgmIt4JNQjS6hR3p3TO8OoeidVLeOXKAQ=;
 b=RvKiGRlRpum/avx/HobFPLaTiiqE2/c+hhyL00tdxMRKz9Q3fsluylISL6FwvGcc00xIti
 AhIxuvGT0/QpCCGoC2ittf4rqAnq4CrRQxq7dZr/Megt3+Nad1PXqpKAnmNZ9ERG8Odilx
 FnUphjL7rO2LPy72S47OUiEhtPzl/0Y=
From: Sarah Morgensen <iskarian@HIDDEN>
To: 49531 <at> debbugs.gnu.org
Subject: [PATCH core-updates 1/4] import: utils: Emit new-style package inputs.
Date: Sun, 11 Jul 2021 22:48:06 -0700
Message-Id: <e04ca693d1e9c9899701ba8868db639949e3cd78.1626067919.git.iskarian@HIDDEN>
In-Reply-To: <cover.1626067919.git.iskarian@HIDDEN>
References: <cover.1626067919.git.iskarian@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Migadu-Auth-User: iskarian@HIDDEN
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 49531
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 (-)

* guix/import/utils.scm (package-names->package-inputs)[make-input]:
Return new-style package inputs.
(maybe-inputs): Wrap PACKAGE-INPUTS in 'list' instead of 'quasiquote'.
---
 guix/import/utils.scm | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index d817318a91..8fa017e18f 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2020 Helio Machado <0x2b3bfa0+guix@HIDDEN>
 ;;; Copyright © 2020 Martin Becze <mjbecze@HIDDEN>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@HIDDEN>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -237,12 +238,10 @@ into a proper sentence and by using two spaces between sentences."
 optional OUTPUT, tries to generate a quoted list of inputs, as suitable to
 use in an 'inputs' field of a package definition."
   (define (make-input input version)
-    (cons* input (list 'unquote (string->symbol
-                                 (if version
-                                     (string-append input "-" version)
-                                     input)))
-           (or (and output (list output))
-               '())))
+    (let ((name (if version (string-append input "-" version) input)))
+      (if output
+          (list (string->symbol name) output)
+          (string->symbol name))))
 
   (map (match-lambda
          ((input version) (make-input input version))
@@ -263,7 +262,7 @@ snippet generated is for regular inputs."
       (()
        '())
       ((package-inputs ...)
-       `((,field-name (,'quasiquote ,package-inputs)))))))
+       `((,field-name (list ,@package-inputs)))))))
 
 (define* (maybe-native-inputs package-names #:optional (output #f))
   "Same as MAYBE-INPUTS, but for native inputs."
-- 
2.31.1





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

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


Received: (at submit) by debbugs.gnu.org; 12 Jul 2021 05:35:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 12 01:35:29 2021
Received: from localhost ([127.0.0.1]:36321 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m2obJ-0003hM-9O
	for submit <at> debbugs.gnu.org; Mon, 12 Jul 2021 01:35:29 -0400
Received: from lists.gnu.org ([209.51.188.17]:46274)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iskarian@HIDDEN>) id 1m2obF-0003hD-5u
 for submit <at> debbugs.gnu.org; Mon, 12 Jul 2021 01:35:28 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:46720)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <iskarian@HIDDEN>) id 1m2obC-0002K2-B6
 for guix-patches@HIDDEN; Mon, 12 Jul 2021 01:35:23 -0400
Received: from out0.migadu.com ([2001:41d0:2:267::]:30534)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <iskarian@HIDDEN>) id 1m2ob9-000282-FR
 for guix-patches@HIDDEN; Mon, 12 Jul 2021 01:35:22 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1;
 t=1626068114;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding;
 bh=37VHsn0Ih1WJ5XsS8dIX7BgttA6ueIM+CthOMGEdjfA=;
 b=Hof4YCPs5ARJoJDXvV57h37wMox61fU5rBLHBdvw23t8kBKq7D9N8mau3hB2BxYbHBoo3s
 OEPpK242Z2KzycRwqTKcNVgJB6fFnoiEazsDN1nadEOncnXGFR7wfnR4aMrmZsO7YTR5Qa
 Omm/DJfCVnNHVdrbNZINNODNQmUgPAI=
From: Sarah Morgensen <iskarian@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH core-updates 0/4] import: {utils, go,
 crate}: Emit new-style package inputs.
Date: Sun, 11 Jul 2021 22:35:11 -0700
Message-Id: <cover.1626067919.git.iskarian@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Migadu-Auth-User: iskarian@HIDDEN
Received-SPF: pass client-ip=2001:41d0:2:267::; envelope-from=iskarian@HIDDEN;
 helo=out0.migadu.com
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: -1.4 (-)
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: -2.4 (--)

Hello Guix,

This should bring the go and crate importers into the new input-label-less
world (they both use PACKAGE-NAMES->PACKAGE-INPUTS in import/utils.scm). Cargo
build system is correspondingly updated to accept both new- and old-style
package inputs. I successfully tested importing, building, and running
'drill', a cargo-build-system package.

I think this leaves the hackage/stackage, egg, gem, and opam importers. Should
we open a bug to track them?

--
Sarah Morgensen (4):
  import: utils: Emit new-style package inputs.
  import: go: Emit new-style package inputs.
  import: crate: Emit new-style package inputs.
  cargo-build-system: Accept new-style package inputs.

 guix/build-system/cargo.scm |  9 ++++++---
 guix/import/crate.scm       |  5 +++--
 guix/import/utils.scm       | 13 ++++++-------
 guix/packages.scm           |  2 ++
 tests/crate.scm             | 30 +++++++++++-------------------
 tests/go.scm                |  3 ++-
 6 files changed, 30 insertions(+), 32 deletions(-)


base-commit: 9b4c3c675c05870e5983c21ce4ff944e0b0bc2fa
-- 
2.31.1





Acknowledgement sent to Sarah Morgensen <iskarian@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#49531; 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, 21 Jul 2021 03:00:02 UTC

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