diff options
author | Joachim Fasting <joachifm@fastmail.fm> | 2018-12-05 18:40:06 +0100 |
---|---|---|
committer | Joachim Fasting <joachifm@fastmail.fm> | 2018-12-05 20:59:35 +0100 |
commit | d2b467a2de7212b078fb970c70675c55da5038e3 (patch) | |
tree | 9b502a0aa689a1072bd3f99482a117c205c243f7 /pkgs/development/r-modules/wrapper.nix | |
parent | 7c73f53d836af32624468e8de7730be1f033667c (diff) |
rWrapper: use runCommand, local build only
This seems more appropriate for a wrapper generator.
Diffstat (limited to 'pkgs/development/r-modules/wrapper.nix')
-rw-r--r-- | pkgs/development/r-modules/wrapper.nix | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/pkgs/development/r-modules/wrapper.nix b/pkgs/development/r-modules/wrapper.nix index d77c24e913d3b..76e819501a57c 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 +'' |