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
This commit is contained in:
Ricardo Wurmus 2024-09-07 21:53:19 +02:00
parent 57c26a2bd8
commit 056910ec86
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -12300,6 +12300,17 @@ (define-public r-quantmod
(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/")