summaryrefslogtreecommitdiff
path: root/guix/import/opam.scm
diff options
context:
space:
mode:
authorMartin Becze <mjbecze@riseup.net>2020-02-04 07:18:18 -0500
committerGuix Patches Tester <>2020-04-29 20:56:14 +0100
commit792d3e3ebda07bf809a2107720b07ceb067979b1 (patch)
tree919ab6b1e95fc1bdd505e7388e6bd6670852b323 /guix/import/opam.scm
parente118837ede3f96bc76c7db22f1fc2cc348099507 (diff)
downloadguix-patches-792d3e3ebda07bf809a2107720b07ceb067979b1.tar
guix-patches-792d3e3ebda07bf809a2107720b07ceb067979b1.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/opam.scm')
-rw-r--r--guix/import/opam.scm8
1 files changed, 4 insertions, 4 deletions
diff --git a/guix/import/opam.scm b/guix/import/opam.scm
index ae7df8a8b5..81f178e6a9 100644
--- a/guix/import/opam.scm
+++ b/guix/import/opam.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -250,7 +251,7 @@ path to the repository."
(substring version 1)
version)))))
-(define* (opam->guix-package name #:key (repository (get-opam-repository)))
+(define* (opam->guix-package name #:key (repository (get-opam-repository)) version)
"Import OPAM package NAME from REPOSITORY (a directory name) or, if
REPOSITORY is #f, from the official OPAM repository. Return a 'package' sexp
or #f on failure."
@@ -311,9 +312,8 @@ or #f on failure."
dependencies))))))))
(define (opam-recursive-import package-name)
- (recursive-import package-name #f
- #:repo->guix-package (lambda (name repo)
- (opam->guix-package name))
+ (recursive-import package-name
+ #:repo->guix-package opam->guix-package
#:guix-name ocaml-name->guix-name))
(define (guix-name->opam-name name)