aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2024-09-08 15:10:05 +0200
committerRicardo Wurmus <rekado@elephly.net>2024-10-02 22:54:11 +0200
commit65c78c05a9ad0c59388ddec5508b769fca4c3727 (patch)
tree4f20c19f4a7636469857e76f3be392a93bcb1201 /gnu
parent3048b6f20440c17f3d8fb045646095faad615da9 (diff)
downloadguix-65c78c05a9ad0c59388ddec5508b769fca4c3727.tar
guix-65c78c05a9ad0c59388ddec5508b769fca4c3727.tar.gz
gnu: r-cli: Attempt to build reproducibly.
* gnu/packages/cran.scm (r-cli)[arguments]: Add phase to avoid embedding the PID while building. Change-Id: Ia119af44bc59a324d55ee750d3d6dd0dfb231b0c
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/cran.scm13
1 files changed, 13 insertions, 0 deletions
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index d8e07c6ed6..51736377b4 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -11163,6 +11163,19 @@ multivariate function estimation using smoothing splines.")
(base32
"0ha8mijnzlz1cxsjk502j2gzspd8fnk3j79bvnqm871225ghi5a2"))))
(build-system r-build-system)
+ (arguments
+ (list
+ #:phases
+ '(modify-phases %standard-phases
+ ;; Do not embed the PID of the build process.
+ (add-after 'unpack 'build-reproducibly
+ (lambda _
+ (setenv "GUIX_BUILD" "yes")
+ (substitute* '("R/onload.R" "R/app.R")
+ (("\\<- Sys\\.getpid\\(\\)")
+ (lambda _
+ (string-append
+ "<- if (Sys.getenv(\"GUIX_BUILD\") == \"\") { Sys.getpid() } else { 12345 }")))))))))
(home-page "https://github.com/r-lib/cli#readme")
(synopsis "Helpers for developing command line interfaces")
(description "This package provides a suite of tools designed to build