From 46d78bf04508617cd14c17235c89bc831309be45 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sat, 29 Apr 2023 15:23:55 +0200 Subject: 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. --- gnu/packages/bioconductor.scm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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)) -- cgit 1.4.1