1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 13:41:26 +00:00
nixpkgs/pkgs/development/r-modules/wrapper.nix
2014-05-04 23:54:11 +02:00

19 lines
398 B
Nix

{ 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
'';
}