unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Josselin Poiret via Bug reports for GNU Guix <bug-guix@gnu.org>
To: Simon Tournier <zimon.toutoune@gmail.com>, 66461@debbugs.gnu.org
Cc: Josselin Poiret <dev@jpoiret.xyz>,
	Julien Lepiller <julien@lepiller.eu>,
	pukkamustard <pukkamustard@posteo.net>
Subject: bug#66461: [PATCH] guix: import: opam: Handle list of licenses.
Date: Sun, 15 Oct 2023 11:38:18 +0200	[thread overview]
Message-ID: <db0ce9de82c59c6bb16826c2ed1d7d3bb56a51d2.1697362698.git.dev@jpoiret.xyz> (raw)
In-Reply-To: <86h6mxle91.fsf@gmail.com>

From: Josselin Poiret <dev@jpoiret.xyz>

* guix/import/opam.scm (opam->guix-package): Handle lists of licenses.
---
Hello Simon,

Here's a quick fix.

Best,
Josselin

 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 @@ (define* (opam->guix-package name #:key (repo '("opam")) version #:allow-other-k
               (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"))))

base-commit: d2923babf3ac44cb6faa88317f77c98f3016820d
-- 
2.41.0





  reply	other threads:[~2023-10-15  9:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-11  9:06 bug#66461: importer opam: unsupported type in string-ci=? Simon Tournier
2023-10-15  9:38 ` Josselin Poiret via Bug reports for GNU Guix [this message]
2023-10-17 12:56   ` bug#66461: [PATCH] guix: import: opam: Handle list of licenses Simon Tournier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=db0ce9de82c59c6bb16826c2ed1d7d3bb56a51d2.1697362698.git.dev@jpoiret.xyz \
    --to=bug-guix@gnu.org \
    --cc=66461@debbugs.gnu.org \
    --cc=dev@jpoiret.xyz \
    --cc=julien@lepiller.eu \
    --cc=pukkamustard@posteo.net \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).