all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sarah Morgensen via Guix-patches via <guix-patches@gnu.org>
To: 49566@debbugs.gnu.org
Subject: [bug#49566] [PATCH core-updates 1/4] import: egg: Emit new-style package inputs.
Date: Wed, 14 Jul 2021 18:40:34 -0700	[thread overview]
Message-ID: <7b10494282bee565b4231c7bc3340128eb62e654.1626311767.git.iskarian@mgsn.dev> (raw)
In-Reply-To: <cover.1626311767.git.iskarian@mgsn.dev>

* guix/import/egg.scm (egg->guix-package): Generate dependency list from
a list of symbols.
[egg-parse-dependency]: Return a list of symbols.
[maybe-inputs]: Wrap INPUTS in 'list' instead of 'quasiquote'.
* tests/egg.scm (match-chicken-foo): Adjust accordingly.
---
 guix/import/egg.scm | 14 ++++++--------
 tests/egg.scm       | 27 +++++++--------------------
 2 files changed, 13 insertions(+), 28 deletions(-)

diff --git a/guix/import/egg.scm b/guix/import/egg.scm
index 107894ddcf..86b54ff56f 100644
--- a/guix/import/egg.scm
+++ b/guix/import/egg.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
 ;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -246,12 +247,9 @@ not work."
           (let ((name (prettify-name (extract-name name))))
             ;; Dependencies are sometimes specified as symbols and sometimes
             ;; as strings
-            (list (string-append (if system? "" package-name-prefix)
-                                 name)
-                  (list 'unquote
-                        (string->symbol (string-append
-                                         (if system? "" package-name-prefix)
-                                         name))))))
+            (string->symbol (string-append
+                             (if system? "" package-name-prefix)
+                             name))))
 
         (define egg-propagated-inputs
           (let ((dependencies (assoc-ref egg-content 'dependencies)))
@@ -290,7 +288,7 @@ not work."
              '())
             ((inputs ...)
              (list (list input-type
-                         (list 'quasiquote inputs))))))
+                         `(list ,@inputs))))))
 
         (values
          `(package
@@ -318,7 +316,7 @@ not work."
             (license ,egg-licenses))
          (filter (lambda (name)
                    (not (member name '("srfi-4"))))
-                 (map (compose guix-name->egg-name first)
+                 (map (compose guix-name->egg-name symbol->string)
                       (append egg-propagated-inputs
                               egg-native-inputs)))))))
 
diff --git a/tests/egg.scm b/tests/egg.scm
index 0884d8d429..9e45a42443 100644
--- a/tests/egg.scm
+++ b/tests/egg.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -86,16 +87,9 @@
     ('build-system 'chicken-build-system)
     ('arguments ('quasiquote ('#:egg-name "foo")))
     ('native-inputs
-     ('quasiquote
-      (("chicken-test" ('unquote chicken-test))
-       ("chicken-srfi-1" ('unquote chicken-srfi-1))
-       ("chicken-begin-syntax" ('unquote chicken-begin-syntax)))))
-    ('inputs
-     ('quasiquote
-      (("libgit2" ('unquote libgit2)))))
-    ('propagated-inputs
-     ('quasiquote
-      (("chicken-datatype" ('unquote chicken-datatype)))))
+     ('list 'chicken-test 'chicken-srfi-1 'chicken-begin-syntax))
+    ('inputs ('list 'libgit2))
+    ('propagated-inputs ('list 'chicken-datatype))
     ('home-page "https://wiki.call-cc.org/egg/foo")
     ('synopsis "Example egg")
     ('description #f)
@@ -108,16 +102,9 @@
     ('source (? file-like? source))
     ('build-system 'chicken-build-system)
     ('arguments ('quasiquote ('#:egg-name "bar")))
-    ('native-inputs
-     ('quasiquote
-      (("chicken-test" ('unquote chicken-test))
-       ("chicken-begin-syntax" ('unquote chicken-begin-syntax)))))
-    ('inputs
-     ('quasiquote
-      (("libgit2" ('unquote libgit2)))))
-    ('propagated-inputs
-     ('quasiquote
-      (("chicken-datatype" ('unquote chicken-datatype)))))
+    ('native-inputs ('list 'chicken-test 'chicken-begin-syntax))
+    ('inputs ('list 'libgit2))
+    ('propagated-inputs ('list 'chicken-datatype))
     ('home-page "https://wiki.call-cc.org/egg/bar")
     ('synopsis "Example egg")
     ('description #f)
-- 
2.31.1





  reply	other threads:[~2021-07-15  1:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15  1:28 [bug#49566] [PATCH core-updates 0/4] import: {egg, gem, opam, hackage}: Emit new-style package inputs Sarah Morgensen via Guix-patches via
2021-07-15  1:40 ` Sarah Morgensen via Guix-patches via [this message]
2021-07-15  1:40 ` [bug#49566] [PATCH core-updates 2/4] import: gem: " Sarah Morgensen via Guix-patches via
2021-07-15  1:40 ` [bug#49566] [PATCH core-updates 3/4] import: opam: " Sarah Morgensen via Guix-patches via
2021-07-15  1:40 ` [bug#49566] [PATCH core-updates 4/4] import: hackage: " Sarah Morgensen via Guix-patches via
2021-07-20 21:34   ` bug#49566: [PATCH core-updates 0/4] import: {egg, gem, opam, hackage}: " 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=7b10494282bee565b4231c7bc3340128eb62e654.1626311767.git.iskarian@mgsn.dev \
    --to=guix-patches@gnu.org \
    --cc=49566@debbugs.gnu.org \
    --cc=iskarian@mgsn.dev \
    /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.