summary refs log tree commit diff
diff options
context:
space:
mode:
authorJosselin Poiret <dev@jpoiret.xyz>2023-10-15 11:38:18 +0200
committerSimon Tournier <zimon.toutoune@gmail.com>2023-10-17 14:52:06 +0200
commitdcc5c34504c94732c135a85fb4db40ca9796270e (patch)
tree87cd23fb44915230d828e26a31dcd777c1324df4
parentdaaebc6457bffde979ca1f0f8b39a6b71ad1d46a (diff)
downloadguix-dcc5c34504c94732c135a85fb4db40ca9796270e.tar.gz
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>
-rw-r--r--guix/import/opam.scm6
1 files 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"))))