guix-devel
[Top][All Lists]
Advanced

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

[PATCH] R dependencies


From: Ricardo Wurmus
Subject: [PATCH] R dependencies
Date: Thu, 3 Sep 2015 12:12:13 +0200

Ludovic Courtès <address@hidden> writes:

> Speaking of which: should we get rid of icedtea6:jdk in the default R
> package (closure size: 1GiB), and maybe of TeX Live (4GiB)?  Or should
> we provide, say, ‘r-light’ with the definition above?
>
> I’m afraid having these two dependencies by default makes it
> prohibitively expensive.

I investigated this a bit and found that the JDK is not really needed at
build time.  The first patch includes a comment explaining why we
dropped the JDK from the inputs.

The second patch adds build phases to install the info documentation.

Removing texlive is possible as well, but it results in the loss of the
following files:

./lib/R/library/grid
  /doc
    displaylist.R
    displaylist.Rnw
    frame.R
    frame.Rnw
    grid.R
    grid.Rnw
    grobs.R
    grobs.Rnw
    index.html
    interactive.R
    interactive.Rnw
    locndimn.R
    locndimn.Rnw
    moveline.R
    moveline.Rnw
    nonfinite.R
    nonfinite.Rnw
    plotexample.R
    plotexample.Rnw
    rotated.R
    rotated.Rnw
    saveload.R
    saveload.Rnw
    sharing.R
    sharing.Rnw
    viewports.R
    viewports.Rnw
  /Meta
    vignette.rds

./lib/R/library/parallel
  /doc
    index.html
    parallel.R
    parallel.Rnw
  /Meta
    vignette.rds

./lib/R/library/utils
  /doc
    index.html
    Sweave.R
    Sweave.Rnw
  /Meta
    vignette.rds

Note that these Rnw files are all literate programming sources
containing the sources that are untangled to .R files and the PDF
documentation.  Interestingly, the source tarball already contains the
PDF files (e.g. the one installed to
“lib/R/library/grid/doc/viewports.pdf”), so we don’t need texlive to
generate them.

Attached are the three patches.

~~ Ricardo

>From 11e8a484733b492ff5ecd6119b9bdef238be6e67 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <address@hidden>
Date: Thu, 3 Sep 2015 11:41:07 +0200
Subject: [PATCH 1/3] gnu: r: Drop IcedTea from inputs.

* gnu/packages/statistics.scm (r)[inputs]: Remove "icedtea6".
---
 gnu/packages/statistics.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index b84c48d..b1cc5cf 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -84,6 +84,16 @@
          "--with-system-pcre"
          "--with-system-tre"
          "--with-system-xz")))
+    ;; R has some support for Java.  When the JDK is available at configure
+    ;; time environment variables pointing to the JDK will be recorded under
+    ;; $R_HOME/etc and ./tools/getsp.java will be compiled which is used by "R
+    ;; CMD javareconf".  "R CMD javareconf" appears to only be used to update
+    ;; the recorded environment variables in $R_HOME/etc.  Refer to
+    ;; 
https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Java-support
+    ;; for additional information.
+
+    ;; As the JDK is a rather large input with only very limited effects on R,
+    ;; we decided to drop it.
     (native-inputs
      `(("bzip2" ,bzip2)
        ("perl" ,perl)
@@ -97,7 +107,6 @@
        ("cairo" ,cairo)
        ("gfortran" ,gfortran)
        ("icu4c" ,icu4c)
-       ("icedtea6" ,icedtea6 "jdk")
        ("lapack" ,lapack)
        ("libjpeg" ,libjpeg)
        ("libpng" ,libpng)
-- 
2.1.0

>From 17f4d01ce2b7bb4b41e565ac43463425e79b6c30 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <address@hidden>
Date: Thu, 3 Sep 2015 11:41:36 +0200
Subject: [PATCH 2/3] gnu: r: Install info documentation.

* gnu/packages/statistics.scm (r)[arguments]: Add phases "make-info" and
  "install-info" to build and install info documentation.
---
 gnu/packages/statistics.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index b1cc5cf..ec705c2 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -68,7 +68,11 @@
          (add-before
           'check 'set-timezone
           ;; Some tests require the timezone to be set.
-          (lambda _ (setenv "TZ" "UTC") #t)))
+          (lambda _ (setenv "TZ" "UTC") #t))
+         (add-after 'build 'make-info
+          (lambda _ (zero? (system* "make" "info"))))
+         (add-after 'build 'install-info
+          (lambda _ (zero? (system* "make" "install-info")))))
        #:configure-flags
        '("--with-blas=openblas"
          "--with-lapack"
-- 
2.1.0

>From d4982f4574579fe60e005807aace966279824f01 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <address@hidden>
Date: Thu, 3 Sep 2015 12:09:47 +0200
Subject: [PATCH 3/3] gnu: r: Drop texlive from native-inputs.

* gnu/packages/statistics.scm (r)[native-inputs]: Remove "texlive".
---
 gnu/packages/statistics.scm | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index ec705c2..7cb61c9 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -102,7 +102,6 @@
      `(("bzip2" ,bzip2)
        ("perl" ,perl)
        ("pkg-config" ,pkg-config)
-       ("texlive" ,texlive) ; needed to make vignettes
        ("texinfo" ,texinfo) ; for building HTML manuals
        ("which" ,which) ; for tests/Examples/base-Ex.R
        ("xz" ,xz)))
-- 
2.1.0


reply via email to

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