From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roel Janssen Subject: [PATCH] gnu: r: Use uname from Guix Date: Wed, 26 Oct 2016 17:11:49 +0200 Message-ID: <87shrj9mbu.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44536) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzPqe-0007t8-0d for guix-devel@gnu.org; Wed, 26 Oct 2016 11:10:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzPqa-0002Pw-LG for guix-devel@gnu.org; Wed, 26 Oct 2016 11:10:35 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37408) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzPqa-0002Po-HL for guix-devel@gnu.org; Wed, 26 Oct 2016 11:10:32 -0400 Received: from [143.121.198.169] (port=59844 helo=roel-tp) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1bzPqZ-0001WL-0g for guix-devel@gnu.org; Wed, 26 Oct 2016 11:10:31 -0400 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org Dear Guix, When running R, it executes a wrapper script that relies on @code{uname} to be available in PATH: > R_HOME_DIR=/gnu/store/dz83xhn43qc2dpdrja8mhx78l7qffqvq-r-3.3.0/lib/R > if test "${R_HOME_DIR}" = "/gnu/store/dz83xhn43qc2dpdrja8mhx78l7qffqvq-r-3.3.0/lib/R"; then > case "linux-gnu" in > linux*) > run_arch=`uname -m` > case "$run_arch" in > x86_64|mips64|ppc64|powerpc64|sparc64|s390x) > libnn=lib64 Running R in a pure, ad-hoc environment will therefore signal a warning that it cannot execute "uname". With the following patch, it no longer makes this assumption. Instead it uses an absolute path to a uname binary from the Guix store. >From e364cb25204edea4d8bfb9cfc52764f811c58e72 Mon Sep 17 00:00:00 2001 From: Roel Janssen Date: Wed, 26 Oct 2016 17:09:19 +0200 Subject: [PATCH] gnu: r: Use uname from Guix * gnu/packages/statistics.scm (r): Use uname from Guix. --- gnu/packages/statistics.scm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm index 1b8d074..5e4cd8c 100644 --- a/gnu/packages/statistics.scm +++ b/gnu/packages/statistics.scm @@ -118,6 +118,12 @@ be output in text, PostScript, PDF or HTML.") "/lib/R/lib")) #:phases (modify-phases %standard-phases + (add-before 'configure 'patch-uname + (lambda* (#:key inputs #:allow-other-keys) + (let ((uname-bin (string-append (assoc-ref inputs "coreutils") + "/bin/uname"))) + (substitute* "src/scripts/R.sh.in" + (("uname") uname-bin))))) (add-before 'configure 'set-default-pager ;; Set default pager to "cat", because otherwise it is "false", @@ -169,6 +175,7 @@ be output in text, PostScript, PDF or HTML.") `(;; We need not only cairo here, but pango to ensure that tests for the ;; "cairo" bitmapType plotting backend succeed. ("pango" ,pango) + ("coreutils" ,coreutils) ("curl" ,curl) ("tzdata" ,tzdata) ("gfortran" ,gfortran) -- 2.10.0 Kind regards, Roel Janssen