import: crate: Gracefully handle non-existent crates.
Fixes <https://bugs.gnu.org/40891>. Reported by Hartmut Goebel <h.goebel@crazy-compilers.com>. * guix/import/crate.scm (crate->guix-package): Wrap value of 'version-number' and 'version*' in (and crate ...).
This commit is contained in:
parent
5dfe02c607
commit
5fbc753ab5
1 changed files with 8 additions and 6 deletions
|
@ -201,14 +201,16 @@ (define crate
|
|||
(lookup-crate crate-name))
|
||||
|
||||
(define version-number
|
||||
(or version
|
||||
(crate-latest-version crate)))
|
||||
(and crate
|
||||
(or version
|
||||
(crate-latest-version crate))))
|
||||
|
||||
(define version*
|
||||
(find (lambda (version)
|
||||
(string=? (crate-version-number version)
|
||||
version-number))
|
||||
(crate-versions crate)))
|
||||
(and crate
|
||||
(find (lambda (version)
|
||||
(string=? (crate-version-number version)
|
||||
version-number))
|
||||
(crate-versions crate))))
|
||||
|
||||
(and crate version*
|
||||
(let* ((dependencies (crate-version-dependencies version*))
|
||||
|
|
Loading…
Reference in a new issue