summaryrefslogtreecommitdiff
path: root/guix/import
diff options
context:
space:
mode:
authoritd <itd@net.in.tum.de>2022-09-23 09:42:53 +0200
committerLudovic Courtès <ludo@gnu.org>2022-09-29 22:59:48 +0200
commit61bd7bf4690329a10e0a1d3fd1425a73d1823576 (patch)
tree4f4114030b40502938c1da226d055d2e9dcc7ba8 /guix/import
parent168a7933c0e138dc7061a3f0dc96871e16da5c5f (diff)
import/utils: alist->package: Include properties.
* guix/import/utils.scm (alist->package): Process properties field in input data and include it in the generated package. * tests/import-utils.scm ("alist->package with properties"): New test. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'guix/import')
-rw-r--r--guix/import/utils.scm10
1 files changed, 10 insertions, 0 deletions
diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index dd8c61b79a..977e1d5f95 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -444,10 +444,20 @@ specifications to look up and replace them with plain symbols instead."
((key . value)
(list (symbol->keyword (string->symbol key)) value)))
arguments))
+ (define (process-properties properties)
+ (map (match-lambda
+ ((key . value)
+ (cons (string->symbol key) value)))
+ properties))
+
(package
(name (assoc-ref meta "name"))
(version (assoc-ref meta "version"))
(source (source-spec->object (assoc-ref meta "source")))
+ (properties
+ (or (and=> (assoc-ref meta "properties")
+ process-properties)
+ '()))
(build-system
(lookup-build-system-by-name
(string->symbol (assoc-ref meta "build-system"))))