summaryrefslogtreecommitdiff
path: root/guix/import/crate.scm
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2021-02-12 22:44:35 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2021-02-12 22:47:09 +0100
commitab512c2104faf6b39cdbe7a0d11facf61158753f (patch)
tree0156729fcf8a162b280e5b1c0ba7fdcaf7dc60ee /guix/import/crate.scm
parent861e567cb17621227a4922ca884519949cf57ebd (diff)
import: crate: Use repository when home-page is unavailable
* guix/import/crate.scm (make-crate-sexp): Always use home-page, which is properly set up by the caller. (crate->guix-package): Make sure to use the repository when home-page is null.
Diffstat (limited to 'guix/import/crate.scm')
-rw-r--r--guix/import/crate.scm15
1 files changed, 10 insertions, 5 deletions
diff --git a/guix/import/crate.scm b/guix/import/crate.scm
index aee1b01c9f..287ffd2536 100644
--- a/guix/import/crate.scm
+++ b/guix/import/crate.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2016 David Craven <david@craven.ch>
;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2019, 2020 Martin Becze <mjbecze@riseup.net>
+;;; Copyright © 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -192,9 +193,7 @@ and LICENSE."
(maybe-cargo-inputs cargo-inputs)
(maybe-cargo-development-inputs
cargo-development-inputs)))
- (home-page ,(match home-page
- ('null "")
- (_ home-page)))
+ (home-page ,home-page)
(synopsis ,synopsis)
(description ,(beautify-description description))
(license ,(match license
@@ -304,8 +303,14 @@ look up the development dependencs for the given crate."
#:version (crate-version-number version*)
#:cargo-inputs cargo-inputs
#:cargo-development-inputs cargo-development-inputs
- #:home-page (or (crate-home-page crate)
- (crate-repository crate))
+ #:home-page
+ (let ((home-page (crate-home-page crate)))
+ (if (string? home-page)
+ home-page
+ (let ((repository (crate-repository crate)))
+ (if (string? repository)
+ repository
+ ""))))
#:synopsis (crate-description crate)
#:description (crate-description crate)
#:license (and=> (crate-version-license version*)