guix_mirror_bot pushed a commit to branch r-team
in repository guix.

commit 9738587e47318dbb7f414211db991d3c2e95bd85
Author: Kyle Andrews <[email protected]>
AuthorDate: Wed Jul 24 23:13:46 2019 -0400

    build-system/r: Use %BIOCONDUCTOR-VERSION.
    
    * guix/build-system/r.scm (bioconductor-uri): Accept optional RELEASE
    argument, defaulting to %BIOCONDUCTOR-VERSION from (guix import cran).
    (default-bioc-version): New procedure.
    
    Change-Id: I5949cd5c01120a2cdeccb522c2d7b2ebb64cb362
---
 guix/build-system/r.scm | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/guix/build-system/r.scm b/guix/build-system/r.scm
index a851b03175..1139e1c0e9 100644
--- a/guix/build-system/r.scm
+++ b/guix/build-system/r.scm
@@ -48,7 +48,12 @@ available via the first URI, the second URI points to the 
archived version."
         (string-append "mirror://cran/src/contrib/Archive/"
                        name "/" name "_" version ".tar.gz")))
 
-(define* (bioconductor-uri name version #:optional type)
+(define (default-bioc-version)
+  "Return the default Bioconductor version lazily."
+  (@* (guix import cran) %bioconductor-version))
+
+(define* (bioconductor-uri name version #:optional type
+                           (release (default-bioc-version)))
   "Return a URI string for the R package archive on Bioconductor for the
 release corresponding to NAME and VERSION."
   (let ((type-url-part (match type
@@ -59,8 +64,7 @@ release corresponding to NAME and VERSION."
                          type-url-part
                          "/src/contrib/"
                          name "_" version ".tar.gz")
-          ;; TODO: use %bioconductor-version from (guix import cran)
-          (string-append "https://bioconductor.org/packages/3.22";
+          (string-append "https://bioconductor.org/packages/"; release
                          type-url-part
                          "/src/contrib/"
                          name "_" version ".tar.gz"))))

Reply via email to