diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2023-07-15 23:11:31 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2023-07-16 00:13:02 +0200 |
commit | fb015e96e2d30e2917de4cfb6b0d0e8c29af8b1a (patch) | |
tree | e8960aa46403ef69e0f769fb3e15ef7853f5c5a2 | |
parent | 49f74b67a44882d2af0529abf3e60a9c37512f2c (diff) | |
download | guix-fb015e96e2d30e2917de4cfb6b0d0e8c29af8b1a.tar.gz |
gnu: r-with-tests: Fix reference to grep.
detectCores.R fails to return the number of cores when running R in a container without grep. Reported-by: Jonas Freimuth. * gnu/packages/statistics.scm (r-with-tests)[arguments]: Fix references to grep and wc in detectCores.R. [inputs]: Add grep.
-rw-r--r-- | gnu/packages/statistics.scm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm index f28e60362c..2043bf2fd3 100644 --- a/gnu/packages/statistics.scm +++ b/gnu/packages/statistics.scm @@ -244,7 +244,15 @@ This package also provides @command{xls2csv} to export Excel files to CSV.") (substitute* "src/scripts/R.sh.in" (("uname") uname-bin)) (substitute* "src/unix/sys-std.c" - (("rm -Rf ") (string-append rm-bin " -Rf ")))))) + (("rm -Rf ") (string-append rm-bin " -Rf "))) + (substitute* "src/library/parallel/R/detectCores.R" + (("'grep") + (string-append "'" + (search-input-file inputs "/bin/grep"))) + (("\\| wc -l") + (string-append "| " + (search-input-file inputs "/bin/wc") + " -l")))))) (add-after 'unpack 'patch-tests (lambda _ ;; This is needed because R is run during the check phase and @@ -401,6 +409,7 @@ as.POSIXct(if (\"\" != Sys.getenv(\"SOURCE_DATE_EPOCH\")) {\ curl openblas gfortran + grep icu4c libjpeg-turbo libpng |