summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2024-09-07 21:53:19 +0200
committerRicardo Wurmus <rekado@elephly.net>2024-09-08 14:23:23 +0200
commit056910ec864cb7cf3225a0c27679d94405db7dcd (patch)
tree0a6820b742d426439999f8d93a83dacd66a08e74 /gnu
parent57c26a2bd8c667afa8028170f13b766cb3378d97 (diff)
gnu: r-quantmod: Attempt to build reproducibly.
* gnu/packages/cran.scm (r-quantmod)[arguments]: Add phase to avoid recording system time when SOURCE_DATE_EPOCH is set. Change-Id: I818ddf5f5bac7041c9a26624996b6b6a0256f3ea
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/cran.scm11
1 files changed, 11 insertions, 0 deletions
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index 98ca4bf2dc..13b92bb6f1 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -12300,6 +12300,17 @@ Fisher's method), and Sidak correction.")
(base32
"165vp2ygry8ibcpxjbyfvfrjbv98syln12kkyzci2ygp84r5sv1r"))))
(build-system r-build-system)
+ (arguments
+ (list
+ #:phases
+ '(modify-phases %standard-phases
+ (add-after 'unpack 'build-reproducibly
+ (lambda _
+ (substitute* "R/buildModel.R"
+ (("Sys.time\\(\\)")
+ "if (\"\" != Sys.getenv(\"SOURCE_DATE_EPOCH\")) {\
+ as.numeric(Sys.getenv(\"SOURCE_DATE_EPOCH\"))\
+} else { Sys.time() }\n")))))))
(propagated-inputs
(list r-curl r-jsonlite r-ttr r-xts r-zoo))
(home-page "https://cran.r-project.org/web/packages/quantmod/")