Thank you Ludo,
I added guile-semver to guix in the attached patch set, and I tested it
by running ./pre-inst-env guix environment guix, which installed the
guile-semver.
and Makefile.am may have to check whether guile-semver is available.)
I didn't see anything in the Makefile.am that looks to check for guile
modules. Let me know if anything needs fixing!
=Martin
>From e4b022ce72582691dadae1b9f31ad6243914a5db Mon Sep 17 00:00:00 2001
From: Martin Becze
Date: Sat, 18 Jan 2020 05:05:03 -0500
Subject: [PATCH v7 1/3] guix: import: (recursive-import) Allow for version
numbers
* guix/import/utils.scm (package->definition) [arguments] added optional `append-version?`
* guix/import/utils.scm (recursive-import) [arguments] added key `version` and
moved `repo` to be a key
* tests/import-utils.scm
* guix/import/cran.scm (cran->guix-package) [argument]: change `repo` to a key
* guix/import/cran.scm (cran-recursive-import) [argument]: change `repo` to a key
* guix/scripts/import/cran.scm: change `repo` to a key
* guix/import/elpa.scm (elpa->guix-pakcage) [argumnets]: change `repo` to a key
* guix/import/elpa.scm (elpa-recursive-import) [argumnets]: change `repo` to a key
* guix/scripts/import/elpa.scm: change `repo` to a key
* guix/import/gem.scm (gem->guix-package) [arguments]: change `repo` to a key
* guix/import/gem.scm (recursive-import) [arguments]: change `repo` to a key
* guix/import/opam.scm (opam-recurive-import) [arguments]: change `repo` to a key
* guix/import/pypi.scm (pypi-recursive-import) [arguments]: change `repo` to a key
* guix/import/stackage.scm (stackage-recursive-import) [arguments]: change `repo` to a key
---
guix/import/cran.scm | 8 +++--
guix/import/elpa.scm | 6 ++--
guix/import/gem.scm | 6 ++--
guix/import/opam.scm | 5 ++--
guix/import/pypi.scm | 5 ++--
guix/import/stackage.scm | 5 ++--
guix/import/utils.scm| 57 +++-
guix/scripts/import/cran.scm | 5 ++--
guix/scripts/import/elpa.scm | 4 ++-
tests/import-utils.scm | 8 +++--
10 files changed, 69 insertions(+), 40 deletions(-)
diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index bcb37ed250..9e05dfcba8 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus
;;; Copyright © 2015, 2016, 2017, 2019, 2020 Ludovic Courtès
;;; Copyright © 2017 Mathieu Othacehe
+;;; Copyright © 2020 Martin Becze
;;;
;;; This file is part of GNU Guix.
;;;
@@ -506,7 +507,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)))
@@ -521,8 +522,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))
diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm
index 2d4487dba0..9140bcdc34 100644
--- a/guix/import/elpa.scm
+++ b/guix/import/elpa.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2015 Federico Beffa
;;; Copyright © 2015, 2016, 2017, 2018, 2020 Ludovic Courtès
;;; Copyright © 2018 Oleg Pykhalov
+;;; Copyright © 2020 Martin Becze
;;;
;;; This file is part of GNU Guix.
;;;
@@ -245,7 +246,7 @@ type ''."
(license ,license))
dependencies-names)))
-(define* (elpa->guix-package name #:optional (repo 'gnu))
+(define* (elpa->guix-package name #:key (repo 'gnu) #:allow-other-keys)
"Fetch the package NAME from REPO and produce a Guix package S-expression."
(match (fetch-elpa-package name repo)
(#f #f)
@@ -301,7 +302,8 @@ type ''."
(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))
diff --git a/guix/import/gem.scm b/guix/import/gem.scm
index 0bf9ff2552..e744d9e69d 100644
--- a/guix/import/gem.scm
+++ b/guix/import/gem.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2015 David Thompson
;;; Copyright © 2016 Ben Woodcroft
;;; Copyright © 2018 Oleg Pykhalov
+;;; Copyright © 2020 Martin Becze
;;;
;;; Thi