mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
import: crate: Gracefully handle missing license info.
Fixes <https://issues.guix.gnu.org/51048>. Reported by Michael Zappa <me@michzappa.com>. * guix/import/crate.scm (<crate-version>)[license]: Translate 'null to #f. (make-crate-sexp): Handle LICENSE = #f.
This commit is contained in:
parent
cd52869134
commit
1327ec822f
1 changed files with 6 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2016 David Craven <david@craven.ch>
|
||||
;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2019, 2020 Martin Becze <mjbecze@riseup.net>
|
||||
;;; Copyright © 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
|
||||
;;;
|
||||
|
@ -79,7 +79,10 @@ (define-json-mapping <crate-version> make-crate-version crate-version?
|
|||
(number crate-version-number "num") ;string
|
||||
(download-path crate-version-download-path "dl_path") ;string
|
||||
(readme-path crate-version-readme-path "readme_path") ;string
|
||||
(license crate-version-license "license") ;string
|
||||
(license crate-version-license "license" ;string | #f
|
||||
(match-lambda
|
||||
('null #f)
|
||||
((? string? str) str)))
|
||||
(links crate-version-links)) ;alist
|
||||
|
||||
;; Crate dependency. Each dependency (each edge in the graph) is annotated as
|
||||
|
@ -198,6 +201,7 @@ (define (format-inputs inputs)
|
|||
(description ,(beautify-description description))
|
||||
(license ,(match license
|
||||
(() #f)
|
||||
(#f #f)
|
||||
((license) license)
|
||||
(_ `(list ,@license)))))))
|
||||
(close-port port)
|
||||
|
|
Loading…
Reference in a new issue