Merge pull request #59340 from marsam/update-buck

buck: 2017.10.01.01 -> 2019.01.10.01
This commit is contained in:
xeji 2019-04-12 19:31:41 +02:00 committed by GitHub
commit 6ebcac79f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,14 +1,14 @@
{ stdenv, fetchFromGitHub, jdk, ant, python2, python2Packages, watchman, bash, makeWrapper }:
stdenv.mkDerivation rec {
name = "buck-${version}";
version = "2017.10.01.01";
pname = "buck";
version = "2019.01.10.01";
src = fetchFromGitHub {
owner = "facebook";
repo = "buck";
repo = pname;
rev = "v${version}";
sha256 = "05nyyb6f0hv1h67zzvdq8297yl8zjhpbasx35lxnrsjz0m1h8ngw";
sha256 = "0987s399v4ba2a3crca12vsg9001xcb5drhqi564ninpa5vxamr2";
};
patches = [ ./pex-mtime.patch ];
@ -20,23 +20,17 @@ stdenv.mkDerivation rec {
buildInputs = [ jdk ant python2 watchman python2Packages.pywatchman ];
nativeBuildInputs = [ makeWrapper ];
targets = [ "buck" "buckd" ];
buildPhase = ''
ant
for exe in ${toString targets}; do
./bin/buck build //programs:$exe
done
./bin/buck build -c buck.release_version=${version} buck
'';
installPhase = ''
for exe in ${toString targets}; do
install -D -m755 buck-out/gen/programs/$exe.pex $out/bin/$exe
wrapProgram $out/bin/$exe \
--prefix PYTHONPATH : $PYTHONPATH \
--prefix PATH : "${stdenv.lib.makeBinPath [jdk watchman]}"
done
install -D -m755 buck-out/gen/programs/buck.pex $out/bin/buck
wrapProgram $out/bin/buck \
--prefix PYTHONPATH : $PYTHONPATH \
--prefix PATH : "${stdenv.lib.makeBinPath [jdk watchman]}"
'';
meta = with stdenv.lib; {