[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 01/11] import: utils: Symbols from 'license->symbol' have a licen
From: |
David Craven |
Subject: |
[PATCH 01/11] import: utils: Symbols from 'license->symbol' have a license: prefix. |
Date: |
Mon, 22 Aug 2016 15:20:08 +0200 |
* guix/import/utils.scm (define-module): guix licenses import uses a prefix.
(string->licenses): Add license: prefix to licenses.
(license->symbol): Add license: prefix to licenses. Return a symbol with the
prefix license:.
---
guix/import/utils.scm | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 44e004b..93cd0f0 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -22,7 +22,7 @@
#:use-module (srfi srfi-1)
#:use-module (guix hash)
#:use-module (guix base32)
- #:use-module (guix licenses)
+ #:use-module ((guix licenses) #:prefix license:)
#:use-module (guix utils)
#:use-module ((guix build download) #:prefix build:)
#:export (factorize-uri
@@ -112,12 +112,12 @@ recursively apply the procedure to the sub-list."
(define (string->license str)
"Convert the string STR into a license object."
(match str
- ("GNU LGPL" lgpl2.0)
- ("GPL" gpl3)
- ((or "BSD" "BSD License") bsd-3)
- ((or "MIT" "MIT license" "Expat license") expat)
- ("Public domain" public-domain)
- ((or "Apache License, Version 2.0" "Apache 2.0") asl2.0)
+ ("GNU LGPL" license:lgpl2.0)
+ ("GPL" license:gpl3)
+ ((or "BSD" "BSD License") license:bsd-3)
+ ((or "MIT" "MIT license" "Expat license") license:expat)
+ ("Public domain" license:public-domain)
+ ((or "Apache License, Version 2.0" "Apache 2.0") license:asl2.0)
(_ #f)))
(define (license->symbol license)
@@ -125,12 +125,12 @@ recursively apply the procedure to the sub-list."
to in the (guix licenses) module, or #f if there is no such known license."
;; TODO: Traverse list public variables in (guix licenses) instead so we
;; don't have to maintain a list manualy.
- (assoc-ref `((,lgpl2.0 . lgpl2.0)
- (,gpl3 . gpl3)
- (,bsd-3 . bsd-3)
- (,expat . expat)
- (,public-domain . public-domain)
- (,asl2.0 . asl2.0))
+ (assoc-ref `((,license:lgpl2.0 . license:lgpl2.0)
+ (,license:gpl3 . license:gpl3)
+ (,license:bsd-3 . license:bsd-3)
+ (,license:expat . license:expat)
+ (,license:public-domain . license:public-domain)
+ (,license:asl2.0 . license:asl2.0))
license))
(define (snake-case str)
--
2.9.0
- [PATCH 02/12] import: utils: Symbols from 'license->symbol' have a license: prefix., David Craven, 2016/08/05
- [PATCH 04/12] gnu: python: Add python-binaryornot., David Craven, 2016/08/05
- Re: [PATCH 04/12] gnu: python: Add python-binaryornot., Leo Famulari, 2016/08/08
- Re: [PATCH 04/12] gnu: python: Add python-binaryornot., David Craven, 2016/08/22
- Re: [PATCH 04/12] gnu: python: Add python-binaryornot., David Craven, 2016/08/22
- [PATCH 01/11] import: utils: Symbols from 'license->symbol' have a license: prefix.,
David Craven <=
- [PATCH 05/11] gnu: Add python-pymongo., David Craven, 2016/08/22
- [PATCH 06/11] gnu: Add python-sh., David Craven, 2016/08/22
- Re: [PATCH 06/11] gnu: Add python-sh., Danny Milosavljevic, 2016/08/27
- Re: [PATCH 06/11] gnu: Add python-sh., David Craven, 2016/08/28
- Guix with U-Boot, Danny Milosavljevic, 2016/08/29
- Re: Guix with U-Boot, David Craven, 2016/08/29
- Re: Guix with U-Boot, David Craven, 2016/08/29
- Re: Guix with U-Boot, Danny Milosavljevic, 2016/08/29
- Re: Guix with U-Boot, David Craven, 2016/08/29
- Re: Guix with U-Boot, Danny Milosavljevic, 2016/08/29