7c6a730e0b
Configure an override in ~/.nixpkgs/config.nix as follows: { packageOverrides = pkgs: { rWrapper = pkgs.rWrapper.override { packages = with pkgs.rPackages; [ Defaults dataTable foreach xtable ]; }; }; }
19 lines
354 B
Nix
19 lines
354 B
Nix
{ 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
|
|
'';
|
|
}
|