R: added wrapper script that provides "R" and "Rscript" binaries that know about extra libraries

Configure an override in ~/.nixpkgs/config.nix as follows:

  {
    packageOverrides = pkgs: {

      rWrapper = pkgs.rWrapper.override {
        packages = with pkgs.rPackages; [ Defaults dataTable foreach xtable ];
      };

    };
  }
This commit is contained in:
Peter Simons 2014-05-04 15:20:51 +02:00
parent adce4233af
commit 7c6a730e0b
2 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1,18 @@
{ stdenv, R, packages, makeWrapper }:
stdenv.mkDerivation {
name = R.name + "-wrapper";
buildInputs = [makeWrapper R] ++ packages;
unpackPhase = ":";
installPhase = ''
mkdir -p $out/bin
cd ${R}/bin
for exe in *; do
makeWrapper ${R}/bin/$exe $out/bin/$exe \
--prefix "R_LIBS_SITE" ":" "$R_LIBS_SITE"
done
'';
}

View file

@ -6435,6 +6435,10 @@ let
overrides = (config.rPackageOverrides or (p: {})) pkgs;
});
rWrapper = callPackage ../development/r-modules/generic/wrapper.nix {
packages = [];
};
### SERVERS
rdf4store = callPackage ../servers/http/4store { };