diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2017-04-05 18:42:06 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2017-05-16 21:40:39 +0200 |
commit | daaa270eccb2b43dfb9eee48ac264c37174adc8c (patch) | |
tree | 26a5e3fbfb3530caa711c1319823ec6063d22266 /guix | |
parent | c9ffa91fd346eb832c05afea5b523c8da5b47500 (diff) | |
download | gnu-guix-daaa270eccb2b43dfb9eee48ac264c37174adc8c.tar gnu-guix-daaa270eccb2b43dfb9eee48ac264c37174adc8c.tar.gz |
import cran: Add predicate for Bioconductor experiment packages.
* guix/import/cran.scm (bioconductor-experiment-package?): New variable.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/import/cran.scm | 13 |
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) |