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