From: Raoul Bonnal <ilpuccio.febo@gmail.com>
To: guix-devel@gnu.org
Subject: [PATCH] gnu: r: Add which to propagated-inputs.
Date: Mon, 23 Jan 2017 22:01:13 +0100 [thread overview]
Message-ID: <20170123210113.43131-1-ilpuccio.febo@gmail.com> (raw)
From: Raoul Jean Pierre Bonnal <ilpuccio.febo@gmail.com>
* gnu/packages/statistics.scm (r)[propagated-inputs]: Add which.
---
Notes:
In my local installation of R
Sys.which(c("bash"))
was not working properly, inspecting the function(below) I had not installed which beforehand.
> Sys.which
function (names)
{
res <- character(length(names))
names(res) <- names
which <- "/gnu/store/cn670s29lsf2nr5axd8gmhl8sb9qpyiq-which-2.21/bin/which"
if (!nzchar(which)) {
warning("'which' was not found on this platform")
return(res)
}
for (i in seq_along(names)) {
if (is.na(names[i])) {
res[i] <- NA
next
}
ans <- suppressWarnings(system(paste(which, shQuote(names[i])),
intern = TRUE, ignore.stderr = TRUE))
if (grepl("solaris", R.version$os)) {
tmp <- strsplit(ans[1], " ", fixed = TRUE)[[1]]
if (identical(tmp[1:3], c("no", i, "in")))
ans <- ""
}
res[i] <- if (length(ans))
ans[1]
else ""
if (!file.exists(res[i]))
res[i] <- ""
}
res
}
requiring which to be installed along with R seems to fix the issue.
gnu/packages/statistics.scm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index f27cb5704..648825b1e 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -191,6 +191,8 @@ be output in text, PostScript, PDF or HTML.")
("pcre" ,pcre)
("readline" ,readline)
("zlib" ,zlib)))
+ (propagated-inputs
+ `(("which" ,which)))
(native-search-paths
(list (search-path-specification
(variable "R_LIBS_SITE")
--
2.11.0
next reply other threads:[~2017-01-23 21:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-23 21:01 Raoul Bonnal [this message]
2017-01-24 21:04 ` [PATCH] gnu: r: Add which to propagated-inputs Ludovic Courtès
2017-01-24 21:54 ` Ra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170123210113.43131-1-ilpuccio.febo@gmail.com \
--to=ilpuccio.febo@gmail.com \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.