2014-05-04 21:12:34 +02:00
|
|
|
{ stdenv, R, makeWrapper, recommendedPackages, packages }:
|
2014-05-04 15:20:51 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = R.name + "-wrapper";
|
|
|
|
|
2014-05-04 21:12:34 +02:00
|
|
|
buildInputs = [makeWrapper R] ++ recommendedPackages ++ packages;
|
2014-05-04 15:20:51 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
}
|