summaryrefslogtreecommitdiff
path: root/guix/scripts/import/crate.scm
diff options
context:
space:
mode:
authorMartin Becze <mjbecze@riseup.net>2020-01-18 10:44:18 -0500
committerGuix Patches Tester <>2020-01-18 16:43:06 +0000
commitd688df9eb6cfbcbc175dc152d1f7f8b7a787ab50 (patch)
treec866a64be0236dfae69870f3a3075b5754aa57ee /guix/scripts/import/crate.scm
parent3747ecb1d3e9ddcc87e4e4e64f6f27b7c7dff884 (diff)
downloadpatches-d688df9eb6cfbcbc175dc152d1f7f8b7a787ab50.tar
patches-d688df9eb6cfbcbc175dc152d1f7f8b7a787ab50.tar.gz
guix: import: crate: Use semver to resovle module versionsseries-2675
* guix/import/crate.scm (make-crate-sexp): formatting, added '#:skip-build?' to build system args; added package definition geneation * guix/import/crate.scm (crate->guix-package): [arguments] moved `verions` to a key. Use semver to resolve the correct module versions * guix/import/crate.scm (crate-name->package0name): [arguments] add #:optional `version` arguement * guix/scripts/import/crate.scm remove package definition generation; changed `version` to a key * tests/crate.scm: added version data to (recursuve-import) test
Diffstat (limited to 'guix/scripts/import/crate.scm')
-rw-r--r--guix/scripts/import/crate.scm11
1 files changed, 3 insertions, 8 deletions
diff --git a/guix/scripts/import/crate.scm b/guix/scripts/import/crate.scm
index d834518c18..552628cfc7 100644
--- a/guix/scripts/import/crate.scm
+++ b/guix/scripts/import/crate.scm
@@ -2,7 +2,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 David Thompson <davet@gnu.org>
;;; Copyright © 2016 David Craven <david@craven.ch>
-;;; Copyright © 2019 Martin Becze <mjbecze@riseup.net>
+;;; Copyright © 2019, 2020 Martin Becze <mjbecze@riseup.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -95,13 +95,8 @@ Import and convert the crate.io package for PACKAGE-NAME.\n"))
(package-name->name+version spec))
(if (assoc-ref opts 'recursive)
- (map (match-lambda
- ((and ('package ('name name) . rest) pkg)
- `(define-public ,(string->symbol name)
- ,pkg))
- (_ #f))
- (crate-recursive-import name version))
- (let ((sexp (crate->guix-package name version)))
+ (crate-recursive-import name #:version version)
+ (let ((sexp (crate->guix-package name #:version version)))
(unless sexp
(leave (G_ "failed to download meta-data for package '~a'~%")
(if version