From 65c78c05a9ad0c59388ddec5508b769fca4c3727 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sun, 8 Sep 2024 15:10:05 +0200 Subject: 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 --- gnu/packages/cran.scm | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'gnu') 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 @@ (define-public r-cli (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 -- cgit v1.2.3