[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#26373: [PATCH 2/6] import cran: Add predicate for Bioconductor exper
From: |
Ricardo Wurmus |
Subject: |
bug#26373: [PATCH 2/6] import cran: Add predicate for Bioconductor experiment packages. |
Date: |
Wed, 5 Apr 2017 18:42:06 +0200 |
* guix/import/cran.scm (bioconductor-experiment-package?): New variable.
---
guix/import/cran.scm | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index f63d23972..48ab7355d 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -453,6 +453,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)
--
2.12.2
bug#26373: [PATCH 1/6] import cran: Exclude experiment packages in predicate "bioconductor-package?"., Ludovic Courtès, 2017/04/10