@@ -639,7 +639,7 @@ (define (description->package repository meta)
(define cran->guix-package
(memoize
- (lambda* (package-name #:key (repo 'cran) version)
+ (lambda* (package-name #:key (repo 'cran) version #: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 version)))
@@ -216,7 +216,8 @@ (define (string->license string)
'unknown-license!)))
(string-split string (string->char-set " /"))))
-(define* (crate->guix-package crate-name #:key version include-dev-deps? repo)
+(define* (crate->guix-package crate-name #:key version include-dev-deps?
+ #:allow-other-keys)
"Fetch the metadata for CRATE-NAME from crates.io, and return the
`package' s-expression corresponding to that package, or #f on failure.
When VERSION is specified, convert it into a semver range and attempt to fetch
@@ -170,7 +170,8 @@ (define string->license
;;; Egg importer.
;;;
-(define* (egg->guix-package name version #:key (file #f) (source #f))
+(define* (egg->guix-package name version #:key (file #f) (source #f)
+ #:allow-other-keys)
"Import a CHICKEN egg called NAME from either the given .egg FILE, or from the
latest NAME metadata downloaded from the official repository if FILE is #f.
Return a <package> record or #f on failure. If VERSION is specified, import
@@ -190,7 +190,7 @@ (define guix-name
(define elm->guix-package
(memoize
- (lambda* (package-name #:key repo version)
+ (lambda* (package-name #:key version #:allow-other-keys)
"Fetch the metadata for PACKAGE-NAME, an Elm package registered at
package.elm.org, and return two values: the `package' s-expression
corresponding to that package (or #f on failure) and a list of Elm
@@ -123,7 +123,8 @@ (define (make-gem-sexp name version hash home-page synopsis description
((license) (license->symbol license))
(_ `(list ,@(map license->symbol licenses)))))))
-(define* (gem->guix-package package-name #:key (repo 'rubygems) version)
+(define* (gem->guix-package package-name #:key (repo 'rubygems) version
+ #:allow-other-keys)
"Fetch the metadata for PACKAGE-NAME from rubygems.org, and return the
`package' s-expression corresponding to that package, or #f on failure.
Optionally include a VERSION string to fetch a specific version gem."
@@ -109,7 +109,8 @@ (define sig-url
#f))))
(define* (gnu->guix-package name
- #:key (key-download 'interactive))
+ #:key (key-download 'interactive)
+ #:allow-other-keys)
"Return the package declaration for NAME as an s-expression. Use
KEY-DOWNLOAD as the OpenPGP key download policy (see 'download-tarball' for
details.)"
@@ -602,7 +602,8 @@ (define (validate-version version available-versions module-path)
(define* (go-module->guix-package module-path #:key
(goproxy "https://proxy.golang.org")
version
- pin-versions?)
+ pin-versions?
+ #:allow-other-keys)
"Return the package S-expression corresponding to MODULE-PATH at VERSION, a Go package.
The meta-data is fetched from the GOPROXY server and https://pkg.go.dev/.
When VERSION is unspecified, the latest version available is used."
@@ -687,7 +688,7 @@ (define* (go-module-recursive-import package-name
package-name
#:repo->guix-package
(memoize
- (lambda* (name #:key version repo)
+ (lambda* (name #:key version repo #:allow-other-keys)
(receive (package-sexp dependencies)
(go-module->guix-package* name #:goproxy goproxy
#:version version
@@ -323,7 +323,8 @@ (define (maybe-arguments)
(define* (hackage->guix-package package-name #:key
(include-test-dependencies? #t)
(port #f)
- (cabal-environment '()))
+ (cabal-environment '())
+ #:allow-other-keys)
"Fetch the Cabal file for PACKAGE-NAME from hackage.haskell.org, or, if the
called with keyword parameter PORT, from PORT. Return the `package'
S-expression corresponding to that package, or #f on failure.
@@ -350,7 +351,7 @@ (define hackage->guix-package/m ;memoized variant
(define* (hackage-recursive-import package-name . args)
(recursive-import package-name
- #:repo->guix-package (lambda* (name #:key repo version)
+ #:repo->guix-package (lambda* (name #:key version #:allow-other-keys)
(apply hackage->guix-package/m
(cons name args)))
#:guix-name hackage-name->package-name))
@@ -234,7 +234,7 @@ (define (hexpm-latest-release package)
(fold (lambda (a b)
(if (version>? a b) a b)) (car versions) versions)))))
-(define* (hexpm->guix-package package-name #:key repo version)
+(define* (hexpm->guix-package package-name #:key version #:allow-other-keys)
"Fetch the metadata for PACKAGE-NAME from hexpms.io, and return the
`package' s-expression corresponding to that package, or #f on failure.
When VERSION is specified, attempt to fetch that version; otherwise fetch the
@@ -439,7 +439,8 @@ (define (filter-deduplicate-map f list)
#f)))))
dependency-list))
-(define* (%minetest->guix-package author/name #:key (sort %default-sort-key))
+(define* (%minetest->guix-package author/name #:key (sort %default-sort-key)
+ #:allow-other-keys)
"Fetch the metadata for AUTHOR/NAME from https://content.minetest.net, and
return the 'package' S-expression corresponding to that package, or raise an
exception on failure. On success, also return the upstream dependencies as a
@@ -475,7 +476,7 @@ (define minetest->guix-package
(memoize %minetest->guix-package))
(define* (minetest-recursive-import author/name #:key (sort %default-sort-key))
- (define* (minetest->guix-package* author/name #:key repo version)
+ (define* (minetest->guix-package* author/name #:key version #:allow-other-keys)
(minetest->guix-package author/name #:sort sort))
(recursive-import author/name
#:repo->guix-package minetest->guix-package*
@@ -338,7 +338,7 @@ (define (opam->guix-source url-dict)
(sha256 (base32 ,(guix-hash-url temp)))))))
'no-source-information)))
-(define* (opam->guix-package name #:key (repo 'opam) version)
+(define* (opam->guix-package name #:key (repo 'opam) version #:allow-other-keys)
"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."
@@ -491,7 +491,7 @@ (define (maybe-upstream-name name)
(define pypi->guix-package
(memoize
- (lambda* (package-name #:key repo version)
+ (lambda* (package-name #:key version #:allow-other-keys)
"Fetch the metadata for PACKAGE-NAME from pypi.org, and return the
`package' s-expression corresponding to that package, or #f on failure."
(let* ((project (pypi-fetch package-name))
@@ -108,7 +108,8 @@ (define stackage->guix-package
(lts-version %default-lts-version)
(packages
(stackage-lts-packages
- (stackage-lts-info-fetch lts-version))))
+ (stackage-lts-info-fetch lts-version)))
+ #:allow-other-keys)
"Fetch Cabal file for PACKAGE-NAME from hackage.haskell.org. The retrieved
version corresponds to the version of PACKAGE-NAME specified in the LTS-VERSION
release at stackage.org. Return the `package' S-expression corresponding to
@@ -125,7 +126,7 @@ (define stackage->guix-package
(define (stackage-recursive-import package-name . args)
(recursive-import package-name
- #:repo->guix-package (lambda* (name #:key repo version)
+ #:repo->guix-package (lambda* (name #:key version #:allow-other-keys)
(apply stackage->guix-package (cons name args)))
#:guix-name hackage-name->package-name))
@@ -303,9 +303,9 @@ (define (tlpdb->package name version package-database)
(define texlive->guix-package
(memoize
(lambda* (name #:key
- repo
(version (number->string %texlive-revision))
- (package-database tlpdb))
+ (package-database tlpdb)
+ #:allow-other-keys)
"Find the metadata for NAME in the tlpdb and return the `package'
s-expression corresponding to that package, or #f on failure."
(tlpdb->package name version (package-database)))))
@@ -580,11 +580,11 @@ (define (topological-sort nodes
(set-insert (node-name head) visited))))))))
(define* (recursive-import package-name
- #:key repo->guix-package guix-name version repo
- #:allow-other-keys)
+ #:key repo->guix-package guix-name version
+ #:allow-other-keys #:rest rest)
"Return a list of package expressions for PACKAGE-NAME and all its
dependencies, sorted in topological order. For each package,
-call (REPO->GUIX-PACKAGE NAME :KEYS version repo), which should return a
+call (REPO->GUIX-PACKAGE NAME :KEYS version), which should return a
package expression and a list of dependencies; call (GUIX-NAME PACKAGE-NAME)
to obtain the Guix package name corresponding to the upstream name."
(define-record-type <node>
@@ -599,9 +599,7 @@ (define (exists? name version)
(not (null? (find-packages-by-name (guix-name name) version))))
(define (lookup-node name version)
- (let* ((package dependencies (repo->guix-package name
- #:version version
- #:repo repo))
+ (let* ((package dependencies (apply repo->guix-package (cons name rest)))
(normalized-deps (map (match-lambda
((name version) (list name version))
(name (list name #f))) dependencies)))