diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2016-10-26 09:47:40 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2017-04-05 18:38:51 +0200 |
commit | 5ae63362ae919caaf722bd4b0199e1c14c994aa5 (patch) | |
tree | 972c209b8cdee9f8cd3a795ea0bf1077078b59c0 /guix | |
parent | 1108a920bd09a8a81e5953ede65f3123bc35ad92 (diff) | |
download | gnu-guix-5ae63362ae919caaf722bd4b0199e1c14c994aa5.tar gnu-guix-5ae63362ae919caaf722bd4b0199e1c14c994aa5.tar.gz |
import cran: Distinguish Bioconductor data packages.
* guix/import/cran.scm (bioconductor-package?): Exclude Bioconductor
data packages.
(bioconductor-data-package?): New procedure.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/import/cran.scm | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/guix/import/cran.scm b/guix/import/cran.scm index a5f91fe8d2..4d36882cf5 100644 --- a/guix/import/cran.scm +++ b/guix/import/cran.scm @@ -424,13 +424,30 @@ dependencies." (define (bioconductor-package? package) "Return true if PACKAGE is an R package from Bioconductor." - (and (string-prefix? "r-" (package-name package)) - (match (and=> (package-source package) origin-uri) - ((? string? uri) - (string-prefix? "http://bioconductor.org" uri)) - ((? list? uris) - (any (cut string-prefix? "http://bioconductor.org" <>) uris)) - (_ #f)))) + (let ((predicate (lambda (uri) + (and (string-prefix? "http://bioconductor.org" uri) + ;; Data packages are not listed in SVN + (not (string-contains uri "/data/annotation/")))))) + (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 (bioconductor-data-package? package) + "Return true if PACKAGE is an R data package from Bioconductor." + (let ((predicate (lambda (uri) + (and (string-prefix? "http://bioconductor.org" uri) + (string-contains uri "/data/annotation/"))))) + (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 |