[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/08: import: elpa: Return 'license:gpl3+ for ELPA only.
From: |
Ludovic Courtès |
Subject: |
02/08: import: elpa: Return 'license:gpl3+ for ELPA only. |
Date: |
Sun, 18 Mar 2018 18:24:31 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 9bb1838c3f982dfb84ba24eb2f727cb39ee5805c
Author: Ludovic Courtès <address@hidden>
Date: Sun Mar 18 22:26:34 2018 +0100
import: elpa: Return 'license:gpl3+ for ELPA only.
Fixes <https://bugs.gnu.org/30836>.
Reported by Konrad Hinsen <address@hidden>.
* guix/import/elpa.scm (elpa-package->sexp): Add LICENSE parameter and
honor it.
(elpa->guix-package): Pass 'license:gpl3+ only when REPO is 'gnu.
---
guix/import/elpa.scm | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm
index 5d3d04e..43e9eb6 100644
--- a/guix/import/elpa.scm
+++ b/guix/import/elpa.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Federico Beffa <address@hidden>
-;;; Copyright © 2015, 2016, 2017 Ludovic Courtès <address@hidden>
+;;; Copyright © 2015, 2016, 2017, 2018 Ludovic Courtès <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -190,7 +190,7 @@ include VERSION."
url)))
(_ #f))))
-(define* (elpa-package->sexp pkg)
+(define* (elpa-package->sexp pkg #:optional license)
"Return the `package' S-expression for the Emacs package PKG, a record of
type '<elpa-package>'."
@@ -234,12 +234,17 @@ type '<elpa-package>'."
(home-page ,(elpa-package-home-page pkg))
(synopsis ,(elpa-package-synopsis pkg))
(description ,(elpa-package-description pkg))
- (license license:gpl3+))))
+ (license ,license))))
(define* (elpa->guix-package name #:optional (repo 'gnu))
"Fetch the package NAME from REPO and produce a Guix package S-expression."
- (let ((pkg (fetch-elpa-package name repo)))
- (and=> pkg elpa-package->sexp)))
+ (match (fetch-elpa-package name repo)
+ (#f #f)
+ (package
+ ;; ELPA is known to contain only GPLv3+ code. Other repos may contain
+ ;; code under other license but there's no license metadata.
+ (let ((license (and (eq? 'gnu repo) 'license:gpl3+)))
+ (elpa-package->sexp package license)))))
;;;
- branch master updated (14f2105 -> 71e08fd), Ludovic Courtès, 2018/03/18
- 01/08: import: elpa: Adjust test for HTTPS URLs., Ludovic Courtès, 2018/03/18
- 02/08: import: elpa: Return 'license:gpl3+ for ELPA only.,
Ludovic Courtès <=
- 04/08: vm: Display a backtrace upon error by default., Ludovic Courtès, 2018/03/18
- 03/08: tests: elpa: Don't actually download files., Ludovic Courtès, 2018/03/18
- 05/08: linux-modules: Add 'current-kernel-directory'., Ludovic Courtès, 2018/03/18
- 06/08: linux-modules: 'load-linux-module*' honors BLACK-LIST in recursive calls., Ludovic Courtès, 2018/03/18
- 08/08: glob: Add an extra glob pattern compilation stage., Ludovic Courtès, 2018/03/18
- 07/08: glob: Support square brackets in patterns., Ludovic Courtès, 2018/03/18