aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2023-04-29 15:23:55 +0200
committerRicardo Wurmus <rekado@elephly.net>2023-04-29 20:28:08 +0200
commit46d78bf04508617cd14c17235c89bc831309be45 (patch)
tree471044ed2bd0af7f8c60f2299b24055e7aa6c450 /gnu
parent9a2908211c230fe96be1fba2cc9590e77aba73aa (diff)
downloadguix-46d78bf04508617cd14c17235c89bc831309be45.tar.gz
guix-46d78bf04508617cd14c17235c89bc831309be45.zip
gnu: r-hpar: Avoid internet access.
ExperimentHub::createHubAccessors needs internet access. When R tests if the package can be loaded it runs zzz.R, which contains the call to createHubAccessors. We set the variable GUIX_BUILD to conditionally disable this call. * gnu/packages/bioconductor.scm (r-hpar)[arguments]: Add two build phases: 'set-HOME and 'avoid-internet-access.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/bioconductor.scm14
1 files changed, 14 insertions, 0 deletions
diff --git a/gnu/packages/bioconductor.scm b/gnu/packages/bioconductor.scm
index 78ae097c77..87e43992b1 100644
--- a/gnu/packages/bioconductor.scm
+++ b/gnu/packages/bioconductor.scm
@@ -7128,6 +7128,20 @@ matrix to solve the memory problem.")
(base32
"1sg0mjada72a13xh3k6xsiaff7xj4mp76r6i8iab8nfkvng07p4i"))))
(build-system r-build-system)
+ (arguments
+ (list
+ #:phases
+ '(modify-phases %standard-phases
+ (add-after 'unpack 'set-HOME
+ (lambda _
+ (setenv "HOME" "/tmp")))
+ (add-after 'unpack 'avoid-internet-access
+ (lambda _
+ (setenv "GUIX_BUILD" "yes")
+ (substitute* "R/zzz.R"
+ (("ExperimentHub::createHubAccessors.*" m)
+ (string-append
+ "if (Sys.getenv(\"GUIX_BUILD\") == \"\") {" m "}"))))))))
(propagated-inputs (list r-experimenthub))
(native-inputs
(list r-knitr))