forked from mirrors/nixpkgs
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:
parent
adce4233af
commit
7c6a730e0b
18
pkgs/development/r-modules/generic/wrapper.nix
Normal file
18
pkgs/development/r-modules/generic/wrapper.nix
Normal 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
|
||||
'';
|
||||
}
|
|
@ -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 { };
|
||||
|
|
Loading…
Reference in a new issue