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 = []; };