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>master
parent
a800224260
commit
3f5bc6cbb3
|
@ -1,6 +1,7 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
|
;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
|
||||||
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
|
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
|
||||||
|
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -335,7 +336,8 @@ or #f on failure."
|
||||||
(home-page ,(metadata-ref opam-content "homepage"))
|
(home-page ,(metadata-ref opam-content "homepage"))
|
||||||
(synopsis ,(metadata-ref opam-content "synopsis"))
|
(synopsis ,(metadata-ref opam-content "synopsis"))
|
||||||
(description ,(metadata-ref opam-content "description"))
|
(description ,(metadata-ref opam-content "description"))
|
||||||
(license #f))
|
(license ,(spdx-string->license
|
||||||
|
(metadata-ref opam-content "license"))))
|
||||||
(filter
|
(filter
|
||||||
(lambda (name)
|
(lambda (name)
|
||||||
(not (member name '("dune" "jbuilder"))))
|
(not (member name '("dune" "jbuilder"))))
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
|
;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
|
||||||
|
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -55,6 +56,7 @@ depends: [
|
||||||
synopsis: \"Some example package\"
|
synopsis: \"Some example package\"
|
||||||
description: \"\"\"
|
description: \"\"\"
|
||||||
This package is just an example.\"\"\"
|
This package is just an example.\"\"\"
|
||||||
|
license: \"BSD-3-Clause\"
|
||||||
url {
|
url {
|
||||||
src: \"https://example.org/foo-1.0.0.tar.gz\"
|
src: \"https://example.org/foo-1.0.0.tar.gz\"
|
||||||
checksum: \"md5=74c6e897658e820006106f45f736381f\"
|
checksum: \"md5=74c6e897658e820006106f45f736381f\"
|
||||||
|
@ -109,7 +111,7 @@ url {
|
||||||
('home-page "https://example.org/")
|
('home-page "https://example.org/")
|
||||||
('synopsis "Some example package")
|
('synopsis "Some example package")
|
||||||
('description "This package is just an example.")
|
('description "This package is just an example.")
|
||||||
('license #f))
|
('license 'license:bsd-3))
|
||||||
(string=? (bytevector->nix-base32-string
|
(string=? (bytevector->nix-base32-string
|
||||||
test-source-hash)
|
test-source-hash)
|
||||||
hash))
|
hash))
|
||||||
|
|
Reference in New Issue