gnu: r-minimal, r-with-tests: Use G-expressions.

* gnu/packages/statistics.scm (r-minimal, r-with-tests)[arguments]: Use
G-expressions.

Change-Id: I241297444cdb261dfc9901efd73c436a7ccf0acf
This commit is contained in:
Ricardo Wurmus 2024-01-30 12:51:40 +01:00
parent 9f1ab898c3
commit afe677a623
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC

View File

@ -228,17 +228,16 @@ This package also provides @command{xls2csv} to export Excel files to CSV.")
"0aj51j34q2b28y28xvlf0dwdj8vpnhjwpvqf7xm05s7fq857dxdk"))))
(build-system gnu-build-system)
(arguments
`(#:disallowed-references (,tzdata-for-tests)
(list
#:disallowed-references `(,tzdata-for-tests)
#:make-flags
(list (string-append "LDFLAGS=-Wl,-rpath="
(assoc-ref %outputs "out")
"/lib/R/lib")
#~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib/R/lib")
;; This affects the embedded timestamp of only the core packages.
"PKG_BUILT_STAMP=1970-01-01")
#:phases
(modify-phases %standard-phases
#~(modify-phases %standard-phases
(add-before 'configure 'do-not-compress-serialized-files
(lambda* (#:key inputs #:allow-other-keys)
(lambda _
;; This ensures that Guix can detect embedded store references;
;; see bug #28157 for details.
(substitute* "src/library/base/makebasedb.R"
@ -360,7 +359,8 @@ as.POSIXct(if (\"\" != Sys.getenv(\"SOURCE_DATE_EPOCH\")) {\
(add-after 'build 'install-info
(lambda _ (invoke "make" "install-info"))))
#:configure-flags
`(;; We build the recommended packages here, because they are needed in
#~(list
;; We build the recommended packages here, because they are needed in
;; order to run the test suite. We disable them in the r-minimal
;; package.
"--with-cairo"
@ -370,11 +370,11 @@ as.POSIXct(if (\"\" != Sys.getenv(\"SOURCE_DATE_EPOCH\")) {\
"--with-libtiff"
"--with-ICU"
"--with-tcltk"
,(string-append "--with-tcl-config="
(assoc-ref %build-inputs "tcl")
(string-append "--with-tcl-config="
#$(this-package-input "tcl")
"/lib/tclConfig.sh")
,(string-append "--with-tk-config="
(assoc-ref %build-inputs "tk")
(string-append "--with-tk-config="
#$(this-package-input "tk")
"/lib/tkConfig.sh")
"--enable-R-shlib"
"--enable-BLAS-shlib"
@ -443,8 +443,8 @@ available, greatly increasing its breadth and scope.")
(package (inherit r-with-tests)
(name "r-minimal")
(arguments
`(#:tests? #f
,@(substitute-keyword-arguments (package-arguments r-with-tests)
(substitute-keyword-arguments (package-arguments r-with-tests)
((#:tests? #f #f) #f)
((#:disallowed-references refs '())
(cons perl refs))
((#:configure-flags flags)
@ -452,16 +452,15 @@ available, greatly increasing its breadth and scope.")
;; random temporary directories and embeds their names in some
;; package files. We build these packages with the r-build-system
;; instead.
`(cons "--without-recommended-packages" ,flags))
#~(cons "--without-recommended-packages" #$flags))
((#:phases phases '%standard-phases)
`(modify-phases ,phases
#~(modify-phases #$phases
(add-after 'install 'remove-extraneous-references
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(substitute* (string-append out "/lib/R/etc/Makeconf")
(substitute* (string-append #$output "/lib/R/etc/Makeconf")
(("^# configure.*")
"# Removed to avoid extraneous references\n"))
(substitute* (string-append out "/lib/R/bin/libtool")
(substitute* (string-append #$output "/lib/R/bin/libtool")
(((string-append
"(-L)?("
(format #false
@ -481,7 +480,7 @@ available, greatly increasing its breadth and scope.")
"|"
(format #false "~a/[^-]+-glibc-[^-]+-static"
(%store-directory))
")/lib")) ""))))))))))))
")/lib")) ""))))))))))
(define-public rmath-standalone
(package (inherit r-minimal)