diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2017-06-08 08:36:59 +0100 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2017-06-08 08:36:59 +0100 |
commit | dffbe98dd696fe3579c9ce430524cce689d85508 (patch) | |
tree | 7218c9085c24a95d7e90dc55dae845634d970ca4 /pkgs/development/tools/build-managers/buck | |
parent | 48c910611f8a592426cbf6dee1cb3c212aa3299b (diff) |
buck: make propagatedBuildInputs runtime deps
Diffstat (limited to 'pkgs/development/tools/build-managers/buck')
-rw-r--r-- | pkgs/development/tools/build-managers/buck/default.nix | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/pkgs/development/tools/build-managers/buck/default.nix b/pkgs/development/tools/build-managers/buck/default.nix index 020750393cd75..dadea794466a9 100644 --- a/pkgs/development/tools/build-managers/buck/default.nix +++ b/pkgs/development/tools/build-managers/buck/default.nix @@ -1,6 +1,8 @@ - { stdenv, pkgs, fetchFromGitHub, fetchgit, jdk, ant, python2, watchman, unzip, bash }: +{ stdenv, fetchFromGitHub, jdk, ant, python2, python2Packages, watchman, unzip, bash, jre, makeWrapper }: -stdenv.mkDerivation rec { + +let +in stdenv.mkDerivation rec { name = "buck-${version}"; version = "v2017.05.31.01"; @@ -14,27 +16,23 @@ stdenv.mkDerivation rec { patches = [ ./pex-mtime.patch ]; postPatch = '' - for f in $(grep -l -r '/bin/bash'); do - substituteInPlace "$f" --replace '/bin/bash' '${bash}/bin/bash' - done + grep -l -r '/bin/bash' --null | xargs -0 sed -i -e "s!/bin/bash!${bash}/bin/bash!g" ''; - buildInputs = [ jdk ant ]; - - propagatedBuildInputs = [ python2 watchman pkgs.python27Packages.pywatchman ]; + buildInputs = [ jdk ant python2 watchman python2Packages.pywatchman ]; + nativeBuildInputs = [ makeWrapper ]; - buildPhase = - '' - ant - ./bin/buck --version - ./bin/buck build buck - ''; + buildPhase = '' + ant + ./bin/buck build buck + ''; - installPhase = - '' - mkdir -p $out/bin - cp buck-out/gen/programs/buck.pex $out/bin/buck - ''; + installPhase = '' + install -D -m755 buck-out/gen/programs/buck.pex $out/bin/buck + wrapProgram $out/bin/buck \ + --prefix PYTHONPATH : $PYTHONPATH \ + --prefix PATH : "${stdenv.lib.makeBinPath [jre watchman]}" + ''; meta = with stdenv.lib; { homepage = https://buckbuild.com/; |