import/utils: alist->package: Include arguments.
authorRicardo Wurmus <rekado@elephly.net>
Thu, 16 Apr 2020 19:44:21 +0000 (21:44 +0200)
committerRicardo Wurmus <rekado@elephly.net>
Thu, 16 Apr 2020 21:41:52 +0000 (23:41 +0200)
* guix/import/utils.scm (alist->package): Process arguments field in input
data and include it in the generated package.

guix/import/utils.scm

index 5fb1322..3809c3d 100644 (file)
@@ -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"))