summaryrefslogtreecommitdiff
path: root/guix/build-system/r.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2019-08-16 14:56:37 +0200
committerRicardo Wurmus <rekado@elephly.net>2019-08-16 15:07:22 +0200
commitc586f427b4831b9b492e5b900b2226e898b8fcfa (patch)
treeeeb0c1ddcec87c5e6651509cabb8bac114a83a1d /guix/build-system/r.scm
parent4cc5e5204b503afb4536a1e93e2fd7a9f57f12bf (diff)
build-system/r: bioconductor-uri: Take optional package type.
* guix/build-system/r.scm (bioconductor-uri): Take optional TYPE argument to return annotation or experiment URLs.
Diffstat (limited to 'guix/build-system/r.scm')
-rw-r--r--guix/build-system/r.scm20
1 files changed, 14 insertions, 6 deletions
diff --git a/guix/build-system/r.scm b/guix/build-system/r.scm
index e7214155be..dd2a9fe8de 100644
--- a/guix/build-system/r.scm
+++ b/guix/build-system/r.scm
@@ -47,14 +47,22 @@ available via the first URI, the second URI points to the archived version."
(string-append "mirror://cran/src/contrib/Archive/"
name "/" name "_" version ".tar.gz")))
-(define (bioconductor-uri name version)
+(define* (bioconductor-uri name version #:optional type)
"Return a URI string for the R package archive on Bioconductor for the
release corresponding to NAME and VERSION."
- (list (string-append "https://bioconductor.org/packages/release/bioc/src/contrib/"
- name "_" version ".tar.gz")
- ;; TODO: use %bioconductor-version from (guix import cran)
- (string-append "https://bioconductor.org/packages/3.9/bioc/src/contrib/Archive/"
- name "_" version ".tar.gz")))
+ (let ((type-url-part (match type
+ ('annotation "/data/annotation")
+ ('experiment "/data/experiment")
+ (_ "/bioc"))))
+ (list (string-append "https://bioconductor.org/packages/release"
+ type-url-part
+ "/src/contrib/"
+ name "_" version ".tar.gz")
+ ;; TODO: use %bioconductor-version from (guix import cran)
+ (string-append "https://bioconductor.org/packages/3.9"
+ type-url-part
+ "/src/contrib/Archive/"
+ name "_" version ".tar.gz"))))
(define %r-build-system-modules
;; Build-side modules imported by default.