@@ -1,14 +1,14 @@
11{ stdenv, fetchFromGitHub, jdk, ant, python2, python2Packages, watchman, bash, makeWrapper }:
22
33stdenv.mkDerivation rec {
4− name = "buck-${version}";
5− version = "2017.10.01.01";
4+ pname = "buck";
5+ version = "2019.01.10.01";
66
77 src = fetchFromGitHub {
88 owner = "facebook";
9− repo = "buck";
9+ repo = pname;
1010 rev = "v${version}";
11− sha256 = "05nyyb6f0hv1h67zzvdq8297yl8zjhpbasx35lxnrsjz0m1h8ngw";
11+ sha256 = "0987s399v4ba2a3crca12vsg9001xcb5drhqi564ninpa5vxamr2";
1212 };
1313
1414 patches = [ ./pex-mtime.patch ];
@@ -20,23 +20,17 @@ stdenv.mkDerivation rec {
2020 buildInputs = [ jdk ant python2 watchman python2Packages.pywatchman ];
2121 nativeBuildInputs = [ makeWrapper ];
2222
23− targets = [ "buck" "buckd" ];
24−
2523 buildPhase = ''
2624 ant
2725
28− for exe in ${toString targets}; do
29− ./bin/buck build //programs:$exe
30− done
26+ ./bin/buck build -c buck.release_version=${version} buck
3127 '';
3228
3329 installPhase = ''
34− for exe in ${toString targets}; do
35− install -D -m755 buck-out/gen/programs/$exe.pex $out/bin/$exe
36− wrapProgram $out/bin/$exe \
37− --prefix PYTHONPATH : $PYTHONPATH \
38− --prefix PATH : "${stdenv.lib.makeBinPath [jdk watchman]}"
39− done
30+ install -D -m755 buck-out/gen/programs/buck.pex $out/bin/buck
31+ wrapProgram $out/bin/buck \
32+ --prefix PYTHONPATH : $PYTHONPATH \
33+ --prefix PATH : "${stdenv.lib.makeBinPath [jdk watchman]}"
4034 '';
4135
4236 meta = with stdenv.lib; {