guix-commits
[Top][All Lists]
Advanced

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

10/12: import/utils: alist->package: Include arguments.


From: guix-commits
Subject: 10/12: import/utils: alist->package: Include arguments.
Date: Thu, 16 Apr 2020 17:43:22 -0400 (EDT)

rekado pushed a commit to branch master
in repository guix.

commit 3fd4c4c8394bca7aa9dd81c0ad81f2bb31989464
Author: Ricardo Wurmus <address@hidden>
AuthorDate: Thu Apr 16 21:44:21 2020 +0200

    import/utils: alist->package: Include arguments.
    
    * guix/import/utils.scm (alist->package): Process arguments field in input
    data and include it in the generated package.
---
 guix/import/utils.scm | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 5fb1322..3809c3d 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -322,6 +322,11 @@ specifications to look up and replace them with plain 
symbols instead."
                    known-inputs)))
       (append (specs->package-lists regular)
               (map string->symbol known))))
+  (define (process-arguments arguments)
+    (append-map (match-lambda
+                  ((key . value)
+                   (list (symbol->keyword (string->symbol key)) value)))
+                arguments))
   (package
     (name (assoc-ref meta "name"))
     (version (assoc-ref meta "version"))
@@ -329,6 +334,10 @@ specifications to look up and replace them with plain 
symbols instead."
     (build-system
       (lookup-build-system-by-name
        (string->symbol (assoc-ref meta "build-system"))))
+    (arguments
+     (or (and=> (assoc-ref meta "arguments")
+                process-arguments)
+         '()))
     (native-inputs (process-inputs "native-inputs"))
     (inputs (process-inputs "inputs"))
     (propagated-inputs (process-inputs "propagated-inputs"))



reply via email to

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