[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/10: import: opam: Generate license for package.
From: |
guix-commits |
Subject: |
07/10: import: opam: Generate license for package. |
Date: |
Fri, 28 May 2021 05:37:01 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 3f5bc6cbb34e1b57829ce3bf482310c49f03d3c3
Author: Xinglu Chen <public@yoctocell.xyz>
AuthorDate: Mon May 24 23:24:28 2021 +0200
import: opam: Generate license for package.
* guix/import/opam.scm (opam->guix-package): Generate license for the
‘license’ field.
* tests/opam.scm (test-opam-file): Update accordingly.
("opam->guix-package"): Likewise.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
guix/import/opam.scm | 4 +++-
tests/opam.scm | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/guix/import/opam.scm b/guix/import/opam.scm
index 670973b..0201376 100644
--- a/guix/import/opam.scm
+++ b/guix/import/opam.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
+;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -335,7 +336,8 @@ or #f on failure."
(home-page ,(metadata-ref opam-content "homepage"))
(synopsis ,(metadata-ref opam-content "synopsis"))
(description ,(metadata-ref opam-content "description"))
- (license #f))
+ (license ,(spdx-string->license
+ (metadata-ref opam-content "license"))))
(filter
(lambda (name)
(not (member name '("dune" "jbuilder"))))
diff --git a/tests/opam.scm b/tests/opam.scm
index 11984b5..f1e3b70 100644
--- a/tests/opam.scm
+++ b/tests/opam.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -55,6 +56,7 @@ depends: [
synopsis: \"Some example package\"
description: \"\"\"
This package is just an example.\"\"\"
+license: \"BSD-3-Clause\"
url {
src: \"https://example.org/foo-1.0.0.tar.gz\"
checksum: \"md5=74c6e897658e820006106f45f736381f\"
@@ -109,7 +111,7 @@ url {
('home-page "https://example.org/")
('synopsis "Some example package")
('description "This package is just an example.")
- ('license #f))
+ ('license 'license:bsd-3))
(string=? (bytevector->nix-base32-string
test-source-hash)
hash))
- branch master updated (90e1f9c -> 416f784), guix-commits, 2021/05/28
- 01/10: gnu: intel-mpi-benchmarks: Remove top-level reference to 'openmpi'., guix-commits, 2021/05/28
- 02/10: deploy: Error out when the FILE argument is missing., guix-commits, 2021/05/28
- 03/10: scripts: Commands warn when passed zero arguments., guix-commits, 2021/05/28
- 04/10: git-download: 'git-predicate' now ignores deleted files., guix-commits, 2021/05/28
- 05/10: git-download: Support submodules in 'git-predicate'., guix-commits, 2021/05/28
- 06/10: gnu: libraft: Update to 0.10.1, guix-commits, 2021/05/28
- 07/10: import: opam: Generate license for package.,
guix-commits <=
- 08/10: gnu: tryton: Factor out custom ‘check’ phase., guix-commits, 2021/05/28
- 09/10: gnu: tryton: Use local 'inputs' instead of global '%build-inputs'., guix-commits, 2021/05/28
- 10/10: gnu: tryton: Allow disabling the test suite., guix-commits, 2021/05/28