import/print: Return license with prefix.

* guix/import/print.scm (license->code): Prepend license: prefix.
This commit is contained in:
Ricardo Wurmus 2020-04-14 17:23:33 +02:00
parent 7b2cb1bf19
commit 1475d45112
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2017, 2020 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;
@ -57,7 +57,7 @@ (define (variable-name val mod)
;; Print either license variable name or the code for a license object
(define (license->code lic)
(let ((var (variable-name lic '(guix licenses))))
(or var
(or (symbol-append 'license: var)
`(license
(name ,(license-name lic))
(uri ,(license-uri lic))