diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2021-01-10 14:30:36 +0200 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2021-01-10 14:30:36 +0200 |
commit | 6985a1acb3e9cc4cad8b6f63d77154842d25c929 (patch) | |
tree | 4df49b9f438e0e466efb3d589027a62b39d49761 /guix/import/elpa.scm | |
parent | 87eaa4207208e16e5e1b22b60ba4ff5c3d035023 (diff) | |
parent | d0fff8f840afc17be40bdc49bff52ed08d5a1a7b (diff) | |
download | guix-6985a1acb3e9cc4cad8b6f63d77154842d25c929.tar.gz guix-6985a1acb3e9cc4cad8b6f63d77154842d25c929.zip |
Merge branch 'master' into staging
Diffstat (limited to 'guix/import/elpa.scm')
-rw-r--r-- | guix/import/elpa.scm | 43 |
1 files changed, 28 insertions, 15 deletions
diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm index 8922e57840..c0dc5acf51 100644 --- a/guix/import/elpa.scm +++ b/guix/import/elpa.scm @@ -1,8 +1,9 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch> -;;; Copyright © 2015, 2016, 2017, 2018, 2020 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2015, 2016, 2017, 2018, 2020, 2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com> ;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net> +;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net> ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,6 +30,8 @@ #:use-module (srfi srfi-9 gnu) #:use-module (srfi srfi-11) #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) + #:use-module (srfi srfi-35) #:use-module ((guix download) #:select (download-to-store)) #:use-module (guix import utils) #:use-module (guix http-client) @@ -392,7 +395,12 @@ type '<elpa-package>'." (define* (elpa->guix-package name #:key (repo 'gnu) version) "Fetch the package NAME from REPO and produce a Guix package S-expression." (match (fetch-elpa-package name repo) - (#f #f) + (#false + (raise (condition + (&message + (message (format #false + "couldn't find meta-data for ELPA package `~a'." + name)))))) (package ;; ELPA is known to contain only GPLv3+ code. Other repos may contain ;; code under other license but there's no license metadata. @@ -411,19 +419,24 @@ type '<elpa-package>'." (string-drop (package-name package) 6) (package-name package))) - (let* ((repo 'gnu) - (info (elpa-package-info name repo)) - (version (match info - ((name raw-version . _) - (elpa-version->string raw-version)))) - (url (match info - ((_ raw-version reqs synopsis kind . rest) - (package-source-url kind name version repo))))) - (upstream-source - (package (package-name package)) - (version version) - (urls (list url)) - (signature-urls (list (string-append url ".sig")))))) + (define repo 'gnu) + + (match (elpa-package-info name repo) + (#f + ;; No info, perhaps because PACKAGE is not truly an ELPA package. + #f) + (info + (let* ((version (match info + ((name raw-version . _) + (elpa-version->string raw-version)))) + (url (match info + ((_ raw-version reqs synopsis kind . rest) + (package-source-url kind name version repo))))) + (upstream-source + (package (package-name package)) + (version version) + (urls (list url)) + (signature-urls (list (string-append url ".sig")))))))) (define package-from-gnu.org? (url-predicate (lambda (url) |