import: crate: Support recursive imports.
* guix/import/crate.scm (crate-recursive-import): New procedure. (crate->guix-package): Return dependencies as a second value. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
b72c22c01a
commit
f837293202
|
@ -40,6 +40,7 @@
|
|||
#:use-module (srfi srfi-26)
|
||||
#:export (crate->guix-package
|
||||
guix-package->crate-name
|
||||
crate-recursive-import
|
||||
%crate-updater))
|
||||
|
||||
|
||||
|
@ -218,6 +219,7 @@ latest version of CRATE-NAME."
|
|||
(cargo-development-inputs
|
||||
(sort (map crate-dependency-id dev-dep-crates)
|
||||
string-ci<?)))
|
||||
(values
|
||||
(make-crate-sexp #:name crate-name
|
||||
#:version (crate-version-number version*)
|
||||
#:cargo-inputs cargo-inputs
|
||||
|
@ -227,7 +229,14 @@ latest version of CRATE-NAME."
|
|||
#:synopsis (crate-description crate)
|
||||
#:description (crate-description crate)
|
||||
#:license (and=> (crate-version-license version*)
|
||||
string->license)))))
|
||||
string->license))
|
||||
(append cargo-inputs cargo-development-inputs)))))
|
||||
|
||||
(define (crate-recursive-import crate-name)
|
||||
(recursive-import crate-name #f
|
||||
#:repo->guix-package (lambda (name repo)
|
||||
(crate->guix-package name))
|
||||
#:guix-name crate-name->package-name))
|
||||
|
||||
(define (guix-package->crate-name package)
|
||||
"Return the crate name of PACKAGE."
|
||||
|
|
Loading…
Reference in New Issue