summaryrefslogtreecommitdiff
path: root/guix/import/cran.scm
diff options
context:
space:
mode:
authorMartin Becze <mjbecze@riseup.net>2020-02-04 07:18:18 -0500
committerGuix Patches Tester <>2020-03-23 16:30:15 +0000
commitc9e58edb0dc249401c22b58d2531e21976462bed (patch)
tree296c8c78598fa613706caebab0f172134538ff92 /guix/import/cran.scm
parentd3e7282ec35d87842e8143f0230e27fd5ec5e74d (diff)
downloadguix-patches-c9e58edb0dc249401c22b58d2531e21976462bed.tar
guix-patches-c9e58edb0dc249401c22b58d2531e21976462bed.tar.gz
import: utils: 'recursive-import' accepts an optional version parameter.
This adds a key VERSION to 'recursive-import' and move the paramter REPO to a key. This also changes all the things that rely on 'recursive-import' * guix/import/utils.scm (recursive-import): Add the VERSION key. Make REPO a key. (package->definition): Added optional 'append-version?'. * guix/import/cran.scm (cran->guix-package): Change the REPO parameter to a key. (cran-recursive-import): Likewise. * guix/import/elpa.scm (elpa->guix-pakcage): Likewise. (elpa-recursive-import): Likewise. * guix/import/gem.scm (gem->guix-package): Likewise. (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 Likewise.
Diffstat (limited to 'guix/import/cran.scm')
-rw-r--r--guix/import/cran.scm8
1 files changed, 5 insertions, 3 deletions
diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index bb8226f714..2cef1f4d4a 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015, 2016, 2017, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -511,7 +512,7 @@ from the alist META, which was derived from the R package's DESCRIPTION file."
(define cran->guix-package
(memoize
- (lambda* (package-name #:optional (repo 'cran))
+ (lambda* (package-name #:key (repo 'cran) #:allow-other-keys)
"Fetch the metadata for PACKAGE-NAME from REPO and return the `package'
s-expression corresponding to that package, or #f on failure."
(let ((description (fetch-description repo package-name)))
@@ -526,8 +527,9 @@ s-expression corresponding to that package, or #f on failure."
(cran->guix-package package-name 'cran))
(else (values #f '()))))))))
-(define* (cran-recursive-import package-name #:optional (repo 'cran))
- (recursive-import package-name repo
+(define* (cran-recursive-import package-name #:key (repo 'cran))
+ (recursive-import package-name
+ #:repo repo
#:repo->guix-package cran->guix-package
#:guix-name cran-guix-name))