guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/05: import: egg: Emit new-style package inputs.


From: guix-commits
Subject: 01/05: import: egg: Emit new-style package inputs.
Date: Tue, 20 Jul 2021 17:44:06 -0400 (EDT)

civodul pushed a commit to branch core-updates
in repository guix.

commit 5b6285518be6e4f588f688dadf70eacf4614b797
Author: Sarah Morgensen <iskarian@mgsn.dev>
AuthorDate: Wed Jul 14 18:40:34 2021 -0700

    import: egg: Emit new-style package inputs.
    
    * 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.
    
    Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
 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 107894d..86b54ff 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 0884d8d..9e45a42 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]