3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/r-modules/wrapper.nix

19 lines
398 B
Nix
Raw Normal View History

{ stdenv, R, makeWrapper, recommendedPackages, packages }:
stdenv.mkDerivation {
name = R.name + "-wrapper";
buildInputs = [makeWrapper R] ++ recommendedPackages ++ 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
'';
}