diff options
Diffstat (limited to 'guix/import/cran.scm')
-rw-r--r-- | guix/import/cran.scm | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/guix/import/cran.scm b/guix/import/cran.scm index b822fbc0ae..a1275b4822 100644 --- a/guix/import/cran.scm +++ b/guix/import/cran.scm @@ -661,12 +661,7 @@ s-expression corresponding to that package, or #f on failure." ;; Check if the upstream name can be extracted from package uri. (package->upstream-name package) ;; Check if package uri(s) are prefixed by "mirror://cran". - (match (and=> (package-source package) origin-uri) - ((? string? uri) - (string-prefix? "mirror://cran" uri)) - ((? list? uris) - (any (cut string-prefix? "mirror://cran" <>) uris)) - (_ #f)))) + ((url-predicate (cut string-prefix? "mirror://cran" <>)) package))) (define (bioconductor-package? package) "Return true if PACKAGE is an R package from Bioconductor." @@ -680,12 +675,7 @@ s-expression corresponding to that package, or #f on failure." ;; Experiment packages are in a separate repository. (not (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))))) + ((url-predicate predicate) package)))) (define (bioconductor-data-package? package) "Return true if PACKAGE is an R data package from Bioconductor." @@ -693,12 +683,7 @@ s-expression corresponding to that package, or #f on failure." (and (string-prefix? "https://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))))) + ((url-predicate predicate) package)))) (define (bioconductor-experiment-package? package) "Return true if PACKAGE is an R experiment package from Bioconductor." @@ -706,12 +691,7 @@ s-expression corresponding to that package, or #f on failure." (and (string-prefix? "https://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))))) + ((url-predicate predicate) package)))) (define %cran-updater (upstream-updater |