diff options
author | Peter Simons <simons@cryp.to> | 2014-05-04 21:12:34 +0200 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2014-05-04 21:12:34 +0200 |
commit | a9258080b1fc8b9d649754a3ef1e047b765752f4 (patch) | |
tree | b950984ca3ca49607793b656a06cd24a73b8b164 | |
parent | a329900977f2ec818baa667b47d8b4ceb0e1ed64 (diff) | |
download | nixlib-a9258080b1fc8b9d649754a3ef1e047b765752f4.tar nixlib-a9258080b1fc8b9d649754a3ef1e047b765752f4.tar.gz nixlib-a9258080b1fc8b9d649754a3ef1e047b765752f4.tar.bz2 nixlib-a9258080b1fc8b9d649754a3ef1e047b765752f4.tar.lz nixlib-a9258080b1fc8b9d649754a3ef1e047b765752f4.tar.xz nixlib-a9258080b1fc8b9d649754a3ef1e047b765752f4.tar.zst nixlib-a9258080b1fc8b9d649754a3ef1e047b765752f4.zip |
R: don't install the "recommended packages"
These packages come with R, but if we install them as part of this build, then we cannot update them without re-building R as well. Instead, we add those packages to the R environment through the r-wrapper. This means that recommended packages can be updated in cran-packgaes.nix, and those updates have an effect on the installation without re-building R itself.
-rw-r--r-- | pkgs/applications/science/math/R/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/r-modules/wrapper/default.nix | 4 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 8 |
3 files changed, 11 insertions, 3 deletions
diff --git a/pkgs/applications/science/math/R/default.nix b/pkgs/applications/science/math/R/default.nix index 4a58c15941c8..452d9816b771 100644 --- a/pkgs/applications/science/math/R/default.nix +++ b/pkgs/applications/science/math/R/default.nix @@ -2,6 +2,7 @@ , libjpeg, libpng, libtiff, ncurses, pango, pcre, perl, readline, tcl , texLive, tk, xz, zlib, less, texinfo, graphviz, icu, pkgconfig, bison , imake, which, jdk, atlas +, withRecommendedPackages ? true }: stdenv.mkDerivation rec { @@ -23,6 +24,7 @@ stdenv.mkDerivation rec { preConfigure = '' configureFlagsArray=( --disable-lto + --with${stdenv.lib.optionalString (!withRecommendedPackages) "out"}-recommended-packages --with-blas="-L${atlas}/lib -lf77blas -latlas" --with-lapack="-L${liblapack}/lib -llapack" --with-readline diff --git a/pkgs/development/r-modules/wrapper/default.nix b/pkgs/development/r-modules/wrapper/default.nix index 6a17c8447c84..b4b4c562873c 100644 --- a/pkgs/development/r-modules/wrapper/default.nix +++ b/pkgs/development/r-modules/wrapper/default.nix @@ -1,9 +1,9 @@ -{ stdenv, R, packages, makeWrapper }: +{ stdenv, R, makeWrapper, recommendedPackages, packages }: stdenv.mkDerivation { name = R.name + "-wrapper"; - buildInputs = [makeWrapper R] ++ packages; + buildInputs = [makeWrapper R] ++ recommendedPackages ++ packages; unpackPhase = ":"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 23ba066967a1..457d347c1437 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6431,9 +6431,15 @@ let R = callPackage ../applications/science/math/R { inherit (xlibs) libX11 libXt; texLive = texLiveAggregationFun { paths = [ texLive texLiveExtra ]; }; + withRecommendedPackages = false; }; - rWrapper = callPackage ../development/r-modules/generic/wrapper.nix { + rWrapper = callPackage ../development/r-modules/wrapper { + # Those packages are usually installed as part of the R build. + recommendedPackages = with rPackages; [ MASS lattice Matrix nlme + survival boot cluster codetools foreign KernSmooth rpart class + nnet spatial mgcv ]; + # Override this attribute to register additional libraries. packages = []; }; |