diff options
author | Martin Becze <mjbecze@riseup.net> | 2020-02-04 07:18:18 -0500 |
---|---|---|
committer | Hartmut Goebel <h.goebel@crazy-compilers.com> | 2020-12-02 22:09:23 +0100 |
commit | bea3b17739fc591b8cf6db1f8d28a6f6c9585577 (patch) | |
tree | f8ddf9ffcc682cdd92674bed6559cb62e93a255b /guix/import/elpa.scm | |
parent | 23e2cd156f54087be0105e5d8f2a1d4bcf18f152 (diff) | |
download | guix-patches-bea3b17739fc591b8cf6db1f8d28a6f6c9585577.tar guix-patches-bea3b17739fc591b8cf6db1f8d28a6f6c9585577.tar.gz |
import: utils: 'recursive-import' accepts an optional version parameter.
This adds a key VERSION to 'recursive-import' and moves the parameter REPO to
a key. This also changes all the places that rely on 'recursive-import'.
* guix/import/utils.scm (recursive-import): Add the VERSION key. Make REPO a
key.
(package->definition): Add optional 'append-version?'.
* guix/scripts/import/crate.scm (guix-import-crate): Add the VERSION key.
* guix/import/crate.scm (crate->guix-package): Add the VERSION key.
(crate-recursive-import): Pass VERSION to recursive-import, remove now
unnecessary code.
* guix/import/cran.scm (cran->guix-package, cran-recursive-import): Change the
REPO parameter to a key.
* guix/import/elpa.scm (elpa->guix-package, elpa-recursive-import): Likewise.
* guix/import/gem.scm (gem->guix-package, recursive-import): Likewise.
* guix/import/opam.scm (opam-recurive-import): Likewise.
* guix/import/pypi.scm (pypi-recursive-import): Likewise.
* guix/import/stackage.scm (stackage-recursive-import): Likewise.
* guix/scripts/import/cran.scm (guix-import-cran): Likewise.
* guix/scripts/import/elpa.scm (guix-import-elpa): Likewise.
* tests/elpa.scm (eval-test-with-elpa): Likewise.
* tests/import-utils.scm (recursive-import): Likewise.
Co-authored-by: Hartmut Goebel <h.goebel@crazy-compilers.com>
Diffstat (limited to 'guix/import/elpa.scm')
-rw-r--r-- | guix/import/elpa.scm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm index 871b918f88..c4e8e84aba 100644 --- a/guix/import/elpa.scm +++ b/guix/import/elpa.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch> ;;; Copyright © 2015, 2016, 2017, 2018, 2020 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com> +;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net> ;;; ;;; This file is part of GNU Guix. ;;; @@ -245,7 +246,7 @@ type '<elpa-package>'." (license ,license)) dependencies-names))) -(define* (elpa->guix-package name #:optional (repo 'gnu)) +(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) @@ -299,7 +300,8 @@ type '<elpa-package>'." (define elpa-guix-name (cut guix-name "emacs-" <>)) (define* (elpa-recursive-import package-name #:optional (repo 'gnu)) - (recursive-import package-name repo + (recursive-import package-name + #:repo repo #:repo->guix-package elpa->guix-package #:guix-name elpa-guix-name)) |