From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:44964) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifKyz-0004TZ-ET for guix-patches@gnu.org; Thu, 12 Dec 2019 04:42:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifKyx-000388-Ru for guix-patches@gnu.org; Thu, 12 Dec 2019 04:42:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:53082) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ifKyw-00034O-0E for guix-patches@gnu.org; Thu, 12 Dec 2019 04:42:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ifKyv-0001Eh-SP for guix-patches@gnu.org; Thu, 12 Dec 2019 04:42:01 -0500 Subject: [bug#38576] [PATCH] gnu: r-irkernel: Fix R kernel loading Resent-Message-ID: References: <20191212074613.GA11713@zpidnp36> From: Ricardo Wurmus In-reply-to: <20191212074613.GA11713@zpidnp36> Date: Thu, 12 Dec 2019 10:41:24 +0100 Message-ID: <87wob13mpn.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Lars-Dominik Braun Cc: 38576@debbugs.gnu.org Hi Lars-Dominik, > * gnu/packages/cran.scm (r-irkernel): Absolute path to R binary > [propagated-inputs]: Generate proper search paths by adding r-minimal > --- > gnu/packages/cran.scm | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm > index 765747ea3b..c54a076014 100644 > --- a/gnu/packages/cran.scm > +++ b/gnu/packages/cran.scm > @@ -12414,6 +12414,12 @@ running IRkernel session.") > "--name" "ir" > "--prefix" out > (string-append out "/site-library/IRkernel/kernel= spec")) > + ;; Record the absolute file name of the 'R' executable in > + ;; 'kernel.json'. > + (substitute* (string-append out "/share/jupyter" > + "/kernels/ir/kernel.json") > + (("\\[\"R\",") > + (string-append "[\"" (which "R") "\","))) > #t)))))) > (inputs > `(("jupyter" ,jupyter))) This part looks fine to me, though I wonder if that=E2=80=99s what users of= this package would expect. Is there an expectation that the effective R is defined by the environment? Or would that not work anyway? > @@ -12423,6 +12429,8 @@ running IRkernel session.") > ("r-evaluate" ,r-evaluate) > ("r-irdisplay" ,r-irdisplay) > ("r-jsonlite" ,r-jsonlite) > + ;; sets R_LIBS_SITE, so R can actually find this package (IRkerne= l) > + ("r-minimal" ,r-minimal) > ("r-pbdzmq" ,r-pbdzmq) > ("r-repr" ,r-repr) > ("r-uuid" ,r-uuid))) This doesn=E2=80=99t look right to me. It seems wrong for any R package to propagate R itself. The R_LIBS_SITE variable is =E2=80=9Cattached=E2=80=9D= to =E2=80=9Cr-minimal=E2=80=9D, so when that is installed R will find the r-ir= kernel package. Am I missing something? -- Ricardo