From 3fd4c4c8394bca7aa9dd81c0ad81f2bb31989464 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 16 Apr 2020 21:44:21 +0200 Subject: 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 5fb1322535..3809c3d074 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")) -- cgit 1.4.1