summaryrefslogtreecommitdiff
path: root/guix/scripts/import
diff options
context:
space:
mode:
authorRicardo Wurmus <ricardo.wurmus@mdc-berlin.de>2015-12-16 14:45:28 +0100
committerRicardo Wurmus <ricardo.wurmus@mdc-berlin.de>2016-01-20 12:41:28 +0100
commitd0bd632f89e242a2a217d7e85194589f088f75ea (patch)
tree10ad2a7ba31c1a0a18f8c48c2d915e0fcc33bdb0 /guix/scripts/import
parent4c3d2b2a8f6f6249b497776e5513bbadf5c6aa4c (diff)
downloadguix-patches-d0bd632f89e242a2a217d7e85194589f088f75ea.tar
guix-patches-d0bd632f89e242a2a217d7e85194589f088f75ea.tar.gz
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.
Diffstat (limited to 'guix/scripts/import')
-rw-r--r--guix/scripts/import/cran.scm9
1 files changed, 8 insertions, 1 deletions
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
@@ -42,6 +42,8 @@
(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 (_ "
-V, --version display version information and exit"))
@@ -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))