summaryrefslogtreecommitdiffstats
path: root/pkgs
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2018-12-05 18:40:06 +0100
committerJoachim Fasting <joachifm@fastmail.fm>2018-12-05 20:59:35 +0100
commitd2b467a2de7212b078fb970c70675c55da5038e3 (patch)
tree9b502a0aa689a1072bd3f99482a117c205c243f7 /pkgs
parent7c73f53d836af32624468e8de7730be1f033667c (diff)
rWrapper: use runCommand, local build only
This seems more appropriate for a wrapper generator.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/r-modules/wrapper.nix36
1 files changed, 16 insertions, 20 deletions
diff --git a/pkgs/development/r-modules/wrapper.nix b/pkgs/development/r-modules/wrapper.nix
index d77c24e913d3..76e819501a57 100644
--- a/pkgs/development/r-modules/wrapper.nix
+++ b/pkgs/development/r-modules/wrapper.nix
@@ -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;
- # Make the list of recommended R packages accessible to other packages such as rpy2
- passthru.recommendedPackages = recommendedPackages;
-
- unpackPhase = ":";
+ nativeBuildInputs = [makeWrapper];
- 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;
- };
+ # Make the list of recommended R packages accessible to other packages such as rpy2
+ 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
+''