summaryrefslogtreecommitdiff
path: root/guix/import/cran.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2020-12-21 23:44:54 +0100
committerMarius Bakke <marius@gnu.org>2020-12-21 23:44:54 +0100
commit119fd58922b00d43d4f8b055f3f622478a13f46d (patch)
tree4869f9f09079d5a33f7dfd51ca8e52200fbeb09f /guix/import/cran.scm
parent85ba5e9335207beef9a650e96d5d64787beb9256 (diff)
parentbbe4ed65ed5fe7dc8ed9d226042852387cee3b1e (diff)
downloadguix-patches-119fd58922b00d43d4f8b055f3f622478a13f46d.tar
guix-patches-119fd58922b00d43d4f8b055f3f622478a13f46d.tar.gz
Merge branch 'ungrafting' into staging
Diffstat (limited to 'guix/import/cran.scm')
-rw-r--r--guix/import/cran.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index 1d25a5125e..9d38be7a1e 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -141,6 +141,7 @@ package definition."
`((,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 @@ from the alist META, which was derived from the R package's DESCRIPTION file."
((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 @@ from the alist META, which was derived from the R package's DESCRIPTION file."
((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))