guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

40/40: guix: import: opam: Handle list of licenses.


From: guix-commits
Subject: 40/40: guix: import: opam: Handle list of licenses.
Date: Tue, 17 Oct 2023 08:54:42 -0400 (EDT)

zimoun pushed a commit to branch master
in repository guix.

commit dcc5c34504c94732c135a85fb4db40ca9796270e
Author: Josselin Poiret <dev@jpoiret.xyz>
AuthorDate: Sun Oct 15 11:38:18 2023 +0200

    guix: import: opam: Handle list of licenses.
    
    Fixes <https://issues.guix.gnu.org/issue/66461>.
    Reported by Simon Tournier <zimon.toutoune@gmail.com>.
    
    * guix/import/opam.scm (opam->guix-package): Handle lists of licenses.
    
    Signed-off-by: Simon Tournier <zimon.toutoune@gmail.com>
---
 guix/import/opam.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/guix/import/opam.scm b/guix/import/opam.scm
index e67146e593..86e82cde59 100644
--- a/guix/import/opam.scm
+++ b/guix/import/opam.scm
@@ -379,8 +379,10 @@ file names.  Return a 'package' sexp or #f on failure."
               (synopsis ,(metadata-ref opam-content "synopsis"))
               (description ,(and=> (metadata-ref opam-content "description")
                                    beautify-description))
-              (license ,(spdx-string->license
-                         (metadata-ref opam-content "license"))))
+              (license ,(match (metadata-ref opam-content "license")
+                          ((('string-pat strs) ...)
+                           `(list ,@(map spdx-string->license strs)))
+                          ((? string? str) (spdx-string->license str)))))
            (filter
              (lambda (name)
                (not (member name '("dune" "jbuilder"))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]