From d0bd632f89e242a2a217d7e85194589f088f75ea Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 16 Dec 2015 14:45:28 +0100 Subject: import: Add Bioconductor importer and updater. * guix/import/cran.scm (%bioconductor-updater, latest-bioconductor-release, bioconductor-package?): New procedures. (cran->guix-package): Support repositories other than CRAN. (%bioconductor-url, %bioconductor-svn-url): New variables. (description->package): Update signature to distinguish between packages from different repositories. (latest-release): Rename procedure ... (latest-cran-release): ... to this. (cran-package?): Do not assume all R packages are available on CRAN. * tests/cran.scm: Update tests. * guix/scripts/import/cran.scm: Add "--archive" option and default to CRAN. * guix/scripts/refresh.scm (%updaters): Add "%bioconductor-updater". * doc/guix.texi: Document Bioconductor importer and updater. --- guix/scripts/import/cran.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'guix/scripts/import') diff --git a/guix/scripts/import/cran.scm b/guix/scripts/import/cran.scm index 8d001ac494..ace1123b90 100644 --- a/guix/scripts/import/cran.scm +++ b/guix/scripts/import/cran.scm @@ -41,6 +41,8 @@ (define (show-help) (display (_ "Usage: guix import cran PACKAGE-NAME Import and convert the CRAN package for PACKAGE-NAME.\n")) + (display (_ " + -a, --archive=ARCHIVE specify the archive repository")) (display (_ " -h, --help display this help and exit")) (display (_ " @@ -57,6 +59,10 @@ Import and convert the CRAN package for PACKAGE-NAME.\n")) (option '(#\V "version") #f #f (lambda args (show-version-and-exit "guix import cran"))) + (option '(#\a "archive") #t #f + (lambda (opt name arg result) + (alist-cons 'repo (string->symbol arg) + (alist-delete 'repo result)))) %standard-import-options)) @@ -82,7 +88,8 @@ Import and convert the CRAN package for PACKAGE-NAME.\n")) (reverse opts)))) (match args ((package-name) - (let ((sexp (cran->guix-package package-name))) + (let ((sexp (cran->guix-package package-name + (or (assoc-ref opts 'repo) 'cran)))) (unless sexp (leave (_ "failed to download description for package '~a'~%") package-name)) -- cgit v1.2.3