gnu-system: license->alist: Allow list in license field.

pull/3/head
Mathieu Lirzin 2016-07-23 21:52:32 +02:00
parent c7c9e91876
commit fba9b37dc9
No known key found for this signature in database
GPG Key ID: 0ADEE10094604D37
1 changed files with 6 additions and 3 deletions

View File

@ -47,9 +47,12 @@
(define (license->alist lcs)
"Return LCS <license> object as an alist."
`((name . ,(license-name lcs))
(uri . ,(license-uri lcs))
(comment . ,(license-comment lcs))))
;; Sometimes 'license' field is a list of licenses.
(if (list? lcs)
(map license->alist lcs)
`((name . ,(license-name lcs))
(uri . ,(license-uri lcs))
(comment . ,(license-comment lcs)))))
(define (package-metadata package)
"Convert PACKAGE to an alist suitable for Hydra."