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>
This commit is contained in:
Josselin Poiret 2023-10-15 11:38:18 +02:00 committed by Simon Tournier
parent daaebc6457
commit dcc5c34504
No known key found for this signature in database
GPG Key ID: 92F1D22C608EE7E5
1 changed files with 4 additions and 2 deletions

View File

@ -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"))))