mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-12 14:16:55 -05:00
import: cran: Use CRAN’s canonical URL as home-page.
* guix/import/cran.scm (%cran-canonical-url): New variable. (description->package): Construct home-page using canonical URL. Signed-off-by: Christopher Baines <mail@cbaines.net>
This commit is contained in:
parent
0510ca15aa
commit
f14bb29def
1 changed files with 6 additions and 1 deletions
|
@ -141,6 +141,7 @@ (define* (maybe-inputs package-inputs #:optional (type 'inputs))
|
|||
`((,type (,'quasiquote ,(format-inputs package-inputs)))))))
|
||||
|
||||
(define %cran-url "https://cran.r-project.org/web/packages/")
|
||||
(define %cran-canonical-url "https://cran.r-project.org/package=")
|
||||
(define %bioconductor-url "https://bioconductor.org/packages/")
|
||||
|
||||
;; The latest Bioconductor release is 3.12. Bioconductor packages should be
|
||||
|
@ -441,6 +442,10 @@ (define (description->package repository meta)
|
|||
((bioconductor) %bioconductor-url)
|
||||
((git) #f)
|
||||
((hg) #f)))
|
||||
(canonical-url-base (case repository
|
||||
((cran) %cran-canonical-url)
|
||||
((bioconductor) %bioconductor-url)
|
||||
((git) #f)))
|
||||
(uri-helper (case repository
|
||||
((cran) cran-uri)
|
||||
((bioconductor) bioconductor-uri)
|
||||
|
@ -456,7 +461,7 @@ (define (description->package repository meta)
|
|||
((hg) (assoc-ref meta 'hg))
|
||||
(else (match (listify meta "URL")
|
||||
((url rest ...) url)
|
||||
(_ (string-append base-url name))))))
|
||||
(_ (string-append canonical-url-base name))))))
|
||||
(source-url (case repository
|
||||
((git) (assoc-ref meta 'git))
|
||||
((hg) (assoc-ref meta 'hg))
|
||||
|
|
Loading…
Reference in a new issue