aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <ricardo.wurmus@mdc-berlin.de>2015-09-17 17:00:18 +0200
committerRicardo Wurmus <ricardo.wurmus@mdc-berlin.de>2015-09-21 10:48:26 +0200
commit5546114e73339f61d777eeb4dc3f7ddacaf187e3 (patch)
treefd68f1b0e13bdf714d2513ca774378ad9b6dcab8
parentfed5a6898b73919046665f9328f3d804823f3ba2 (diff)
downloadgnu-guix-5546114e73339f61d777eeb4dc3f7ddacaf187e3.tar
gnu-guix-5546114e73339f61d777eeb4dc3f7ddacaf187e3.tar.gz
build: Add cran-uri procedure.
* guix/build-system/r.scm (cran-uri): New procedure.
-rw-r--r--guix/build-system/r.scm12
1 files changed, 11 insertions, 1 deletions
diff --git a/guix/build-system/r.scm b/guix/build-system/r.scm
index 4daec5eb66..da06cb1358 100644
--- a/guix/build-system/r.scm
+++ b/guix/build-system/r.scm
@@ -28,7 +28,8 @@
#:use-module (srfi srfi-26)
#:export (%r-build-system-modules
r-build
- r-build-system))
+ r-build-system
+ cran-uri))
;; Commentary:
;;
@@ -36,6 +37,15 @@
;;
;; Code:
+(define (cran-uri name version)
+ "Return a list of URI strings for the R package archive on CRAN for the
+release corresponding to NAME and VERSION. As only the most recent version is
+available via the first URI, the second URI points to the archived version."
+ (list (string-append "mirror://cran/src/contrib/"
+ name "_" version ".tar.gz")
+ (string-append "mirror://cran/src/contrib/Archive/"
+ name "/" name "_" version ".tar.gz")))
+
(define %r-build-system-modules
;; Build-side modules imported by default.
`((guix build r-build-system)