diff options
author | Mathieu Lirzin <mthl@gnu.org> | 2016-07-14 02:51:01 +0200 |
---|---|---|
committer | Mathieu Lirzin <mthl@gnu.org> | 2016-07-14 17:44:23 +0200 |
commit | 55e72cb1074b5819660f93426e09c0a10f78e102 (patch) | |
tree | d11631096ee065f3f6cd3e57f9557e5d1b84328d | |
parent | 1a542e4d1bdf66366ad935be5be70a3f2252a776 (diff) | |
download | cuirass-55e72cb1074b5819660f93426e09c0a10f78e102.tar cuirass-55e72cb1074b5819660f93426e09c0a10f78e102.tar.gz |
gnu-system: Add 'license->alist' procedure.
-rw-r--r-- | tests/gnu-system.scm | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/gnu-system.scm b/tests/gnu-system.scm index 90c2af8..b8b66db 100644 --- a/tests/gnu-system.scm +++ b/tests/gnu-system.scm @@ -31,7 +31,8 @@ (guix packages) (guix derivations) (guix monads) - ((guix licenses) #:select (gpl3+)) + ((guix licenses) + #:select (gpl3+ license-name license-uri license-comment)) ((guix utils) #:select (%current-system)) ((guix scripts system) #:select (read-operating-system)) (gnu packages) @@ -44,11 +45,17 @@ (srfi srfi-1) (ice-9 match)) +(define (license->alist lcs) + "Return LCS <license> object as an alist." + `((name . ,(license-name lcs)) + (uri . ,(license-uri lcs)) + (comment . ,(license-comment lcs)))) + (define (package-metadata package) "Convert PACKAGE to an alist suitable for Hydra." `((#:description . ,(package-synopsis package)) (#:long-description . ,(package-description package)) - ;; (#:license . ,(package-license package)) + (#:license . ,(license->alist (package-license package))) (#:home-page . ,(package-home-page package)) (#:maintainers . ("bug-guix@gnu.org")) (#:max-silent-time . ,(or (assoc-ref (package-properties package) @@ -117,7 +124,7 @@ for TARGET on SYSTEM." (#:long-description . "This is a tarball containing binaries of Guix and all its dependencies, and ready to be installed on non-GuixSD distributions.") - ;; (#:license . ,gpl3+) + (#:license . ,(license->alist gpl3+)) (#:home-page . ,%guix-home-page-url) (#:maintainers . ("bug-guix@gnu.org"))))) |