mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 15:11:25 +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 {
|
||||
name = R.name + "-wrapper";
|
||||
runCommand (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
|
||||
passthru.recommendedPackages = 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;
|
||||
};
|
||||
passthru = { inherit recommendedPackages; };
|
||||
}
|
||||
''
|
||||
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