Subject: [bug#36805] Small patch to remove TODO for (@@ (guix build-system r) bioconductor-uri)

From: Kyle Andrews <[email-masked]>
Date: Wed, 24 Jul 2019 23:13:46 -0400

Hi,

I am a heavy R user trying to get my feet wet with guix. Here is a
patch to remove the hard-coded bioconductor release by adding an
optional 3rd argument to the function with an appropriate default
value. I hope this is helpful.

Regards,

Kyle Andrews

From 729e621cc2175864937b6a4a3e754bd128ac9056 Mon Sep 17 00:00:00 2001
From: Kyle Andrews <[email-masked]>
Date: Wed, 24 Jul 2019 22:51:20 -0400
Subject: [PATCH] NAME and VERSION are not enough for Bioconductor URI. Need
 RELEASE.

---
 guix/build-system/r.scm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/guix/build-system/r.scm b/guix/build-system/r.scm
index fbf08d3aa7..93b2f2f14f 100644
--- a/guix/build-system/r.scm
+++ b/guix/build-system/r.scm
@@ -47,13 +47,14 @@ 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)
+(define* (bioconductor-uri name version
+                           #:optional
+                           (release (@@ (guix import cran) %bioconductor-version)))
   "Return a URI string for the R package archive on Bioconductor for the
-release corresponding to NAME and VERSION."
+release corresponding to NAME, package VERSION, and Bioconductor RELEASE."
   (list (string-append "https://bioconductor.org/packages/release/bioc/src/contrib/"
                        name "_" version ".tar.gz")
-        (string-append "https://bioconductor.org/packages/"
-                       (@@ (guix import cran) %bioconductor-version)
+        (string-append "https://bioconductor.org/packages/" release
                        "/bioc/src/contrib/Archive/"
                        name "_" version ".tar.gz")))
 
-- 
2.22.0