mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
import/utils: spdx-string->license: Fix incorrect docstring.
The result of 'spdx-string->license' is a symbol, not a license object. * guix/import/utils.scm (spdx-string->license): Fix docstring. (license->symbol): Mention 'license:' prefix in docstring. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
a6da50d60a
commit
b253efef23
1 changed files with 7 additions and 4 deletions
|
@ -12,6 +12,7 @@
|
|||
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
|
||||
;;; Copyright © 2022 Alice Brenon <alice.brenon@ens-lyon.fr>
|
||||
;;; Copyright © 2022 Kyle Meyer <kyle@kyleam.com>
|
||||
;;; Copyright © 2022 Philip McGrath <philip@philipmcgrath.com>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -131,8 +132,9 @@ (define (guix-hash-url filename)
|
|||
(bytevector->nix-base32-string (file-sha256 filename)))
|
||||
|
||||
(define (spdx-string->license str)
|
||||
"Convert STR, a SPDX formatted license identifier, to a license object.
|
||||
Return #f if STR does not match any known identifiers."
|
||||
"Convert STR, an SPDX license identifier, to a symbol like 'license:gpl3+
|
||||
giving the prefixed name of a license object exported from (guix licenses).
|
||||
Return #f if STR does not match any known SPDX license identifiers."
|
||||
;; https://spdx.org/licenses/
|
||||
;; The gfl1.0, nmap, repoze
|
||||
;; licenses doesn't have SPDX identifiers
|
||||
|
@ -257,8 +259,9 @@ (define (spdx-string->license str)
|
|||
(_ #f)))
|
||||
|
||||
(define (license->symbol license)
|
||||
"Convert license to a symbol representing the variable the object is bound
|
||||
to in the (guix licenses) module, or #f if there is no such known license."
|
||||
"Convert LICENSE object to a prefixed symbol representing the variable the
|
||||
object is bound to in the (guix licenses) module, such as 'license:gpl3+, or
|
||||
#f if there is no such known license."
|
||||
(define licenses
|
||||
(module-map (lambda (sym var) `(,(variable-ref var) . ,sym))
|
||||
(resolve-interface '(guix licenses) #:prefix 'license:)))
|
||||
|
|
Loading…
Reference in a new issue