rWrapper: use runCommand, local build only

This seems more appropriate for a wrapper generator.
This commit is contained in:
Joachim Fasting 2018-12-05 18:40:06 +01:00
parent 7c73f53d83
commit d2b467a2de
No known key found for this signature in database
GPG Key ID: 5C204DF675C90294

View File

@ -1,25 +1,21 @@
{ stdenv, R, makeWrapper, recommendedPackages, packages }: { runCommand, R, makeWrapper, recommendedPackages, packages }:
stdenv.mkDerivation { runCommand (R.name + "-wrapper") {
name = R.name + "-wrapper"; preferLocalBuild = true;
allowSubstitutes = false;
buildInputs = [makeWrapper R] ++ recommendedPackages ++ packages; buildInputs = [R] ++ recommendedPackages ++ packages;
nativeBuildInputs = [makeWrapper];
# Make the list of recommended R packages accessible to other packages such as rpy2 # Make the list of recommended R packages accessible to other packages such as rpy2
passthru.recommendedPackages = recommendedPackages; passthru = { inherit recommendedPackages; };
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
'';
meta = {
platforms = stdenv.lib.platforms.unix;
};
} }
''
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
''