From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60856) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cvo1S-000294-6u for guix-patches@gnu.org; Wed, 05 Apr 2017 12:43:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cvo1O-0007g2-K6 for guix-patches@gnu.org; Wed, 05 Apr 2017 12:43:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:35685) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cvo1O-0007fy-Gq for guix-patches@gnu.org; Wed, 05 Apr 2017 12:43:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cvo1O-0003Sw-At for guix-patches@gnu.org; Wed, 05 Apr 2017 12:43:02 -0400 Subject: bug#26373: [PATCH 2/6] import cran: Add predicate for Bioconductor experiment packages. Resent-Message-ID: From: Ricardo Wurmus Date: Wed, 5 Apr 2017 18:42:06 +0200 Message-Id: <20170405164210.29428-2-rekado@elephly.net> In-Reply-To: <20170405164210.29428-1-rekado@elephly.net> References: <20170405164210.29428-1-rekado@elephly.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 26373@debbugs.gnu.org Cc: Ricardo Wurmus * 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