all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Attila Lendvai <attila@lendvai.name>
To: 54910@debbugs.gnu.org
Cc: Attila Lendvai <attila@lendvai.name>
Subject: [bug#54910] [PATCH] guix: import: Convert inputs to the new format.
Date: Wed, 13 Apr 2022 14:30:59 +0200	[thread overview]
Message-ID: <20220413123108.5902-1-attila@lendvai.name> (raw)

* guix/import/utils.scm (package-names->package-inputs): Return the simplified format.
(maybe-inputs): Use the simplified format.
---
 guix/import/utils.scm | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 9cadbb3d5f..40dae55acd 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -268,12 +268,13 @@ (define* (package-names->package-inputs names #:optional (output #f))
 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 ((pkg (string->symbol
+                (if version
+                    (string-append input "-" version)
+                    input))))
+      (if output
+          (list pkg output)
+          pkg)))
 
   (map (match-lambda
          ((input version) (make-input input version))
@@ -294,7 +295,7 @@ (define* (maybe-inputs package-names #:optional (output #f)
       (()
        '())
       ((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.35.1





             reply	other threads:[~2022-04-13 12:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-13 12:30 Attila Lendvai [this message]
2022-04-14 10:33 ` [bug#54910] [PATCH] guix: import: Convert inputs to the new format Ricardo Wurmus
2022-05-23 13:37   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220413123108.5902-1-attila@lendvai.name \
    --to=attila@lendvai.name \
    --cc=54910@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.