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.
This commit is contained in:
Ricardo Wurmus 2020-04-16 21:44:21 +02:00
parent 7cef499bb0
commit 3fd4c4c839
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -322,6 +322,11 @@ (define (process-inputs which)
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 @@ (define (process-inputs which)
(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"))