aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2017-04-05 18:42:06 +0200
committerRicardo Wurmus <rekado@elephly.net>2017-05-16 21:40:39 +0200
commitdaaa270eccb2b43dfb9eee48ac264c37174adc8c (patch)
tree26a5e3fbfb3530caa711c1319823ec6063d22266
parentc9ffa91fd346eb832c05afea5b523c8da5b47500 (diff)
downloadguix-daaa270eccb2b43dfb9eee48ac264c37174adc8c.tar
guix-daaa270eccb2b43dfb9eee48ac264c37174adc8c.tar.gz
import cran: Add predicate for Bioconductor experiment packages.
* guix/import/cran.scm (bioconductor-experiment-package?): New variable.
-rw-r--r--guix/import/cran.scm13
1 files changed, 13 insertions, 0 deletions
diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index 1adffc4fbb..2de1cd9dba 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -457,6 +457,19 @@ dependencies."
(any predicate uris))
(_ #f)))))
+(define (bioconductor-experiment-package? package)
+ "Return true if PACKAGE is an R experiment package from Bioconductor."
+ (let ((predicate (lambda (uri)
+ (and (string-prefix? "http://bioconductor.org" uri)
+ (string-contains uri "/data/experiment/")))))
+ (and (string-prefix? "r-" (package-name package))
+ (match (and=> (package-source package) origin-uri)
+ ((? string? uri)
+ (predicate uri))
+ ((? list? uris)
+ (any predicate uris))
+ (_ #f)))))
+
(define %cran-updater
(upstream-updater
(name 'cran)