mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 18:03:04 +00:00
rWrapper: use runCommand, local build only
This seems more appropriate for a wrapper generator.
This commit is contained in:
parent
7c73f53d83
commit
d2b467a2de
@ -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
|
||||||
|
''
|
||||||
|
Loading…
Reference in New Issue
Block a user