guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#38576] [PATCH] gnu: r-irkernel: Fix R kernel loading


From: Ricardo Wurmus
Subject: [bug#38576] [PATCH] gnu: r-irkernel: Fix R kernel loading
Date: Thu, 12 Dec 2019 10:41:24 +0100
User-agent: mu4e 1.2.0; emacs 26.3

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/kernelspec"))
> +               ;; 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’s 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 (IRkernel)
> +       ("r-minimal" ,r-minimal)
>         ("r-pbdzmq" ,r-pbdzmq)
>         ("r-repr" ,r-repr)
>         ("r-uuid" ,r-uuid)))

This doesn’t look right to me.  It seems wrong for any R package to
propagate R itself.  The R_LIBS_SITE variable is “attached” to
“r-minimal”, so when that is installed R will find the r-irkernel
package.  Am I missing something?

--
Ricardo






reply via email to

[Prev in Thread] Current Thread [Next in Thread]