mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
import: crate: Provide a default home-page value.
* guix/import/crate.scm (make-crate-sexp): Provide a default home-page value. * tests/crate.scm (test-crate): Add repository field. Problem reported by ng0 <ng0@libertad.pw>.
This commit is contained in:
parent
dc77498c1c
commit
f53a5514e0
2 changed files with 10 additions and 3 deletions
|
@ -55,7 +55,8 @@ (define (crate-kind-predicate kind)
|
|||
(crate (assoc-ref crate-json "crate"))
|
||||
(name (assoc-ref crate "name"))
|
||||
(version (assoc-ref crate "max_version"))
|
||||
(home-page (assoc-ref crate "homepage"))
|
||||
(homepage (assoc-ref crate "homepage"))
|
||||
(repository (assoc-ref crate "repository"))
|
||||
(synopsis (assoc-ref crate "description"))
|
||||
(description (assoc-ref crate "description"))
|
||||
(license (string->license (assoc-ref crate "license")))
|
||||
|
@ -67,7 +68,10 @@ (define (crate-kind-predicate kind)
|
|||
(filter (lambda (dep)
|
||||
(not ((crate-kind-predicate "normal") dep))) deps))
|
||||
(inputs (crates->inputs input-crates))
|
||||
(native-inputs (crates->inputs native-input-crates)))
|
||||
(native-inputs (crates->inputs native-input-crates))
|
||||
(home-page (match homepage
|
||||
(() repository)
|
||||
(_ homepage))))
|
||||
(callback #:name name #:version version
|
||||
#:inputs inputs #:native-inputs native-inputs
|
||||
#:home-page home-page #:synopsis synopsis
|
||||
|
@ -95,7 +99,9 @@ (define* (make-crate-sexp #:key name version inputs native-inputs
|
|||
(build-system cargo-build-system)
|
||||
,@(maybe-native-inputs native-inputs)
|
||||
,@(maybe-inputs inputs)
|
||||
(home-page ,home-page)
|
||||
(home-page ,(match home-page
|
||||
(() "")
|
||||
(_ home-page)))
|
||||
(synopsis ,synopsis)
|
||||
(description ,(beautify-description description))
|
||||
(license ,(match license
|
||||
|
|
|
@ -35,6 +35,7 @@ (define test-crate
|
|||
\"license\": \"MIT/Apache-2.0\",
|
||||
\"description\": \"summary\",
|
||||
\"homepage\": \"http://example.com\",
|
||||
\"repository\": \"http://example.com\",
|
||||
}
|
||||
}")
|
||||
|
||||
|
|
Loading…
Reference in a new issue