1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/tools/build-managers/buck/default.nix

44 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, jdk, ant, python2, python2Packages, watchman, bash, makeWrapper }:
2017-06-07 04:35:29 +01:00
2017-06-08 19:26:42 +01:00
stdenv.mkDerivation rec {
2019-04-11 14:10:00 +01:00
pname = "buck";
version = "2019.10.17.01";
2017-06-07 04:35:29 +01:00
src = fetchFromGitHub {
owner = "facebook";
2019-04-11 14:10:00 +01:00
repo = pname;
rev = "v${version}";
sha256 = "1irgp8yq1z11bq3b83yxvj35wqqq7y7b8q4d4y0hc05ac19ja0vj";
2017-06-07 04:35:29 +01:00
};
patches = [ ./pex-mtime.patch ];
postPatch = ''
grep -l -r '/bin/bash' --null | xargs -0 sed -i -e "s!/bin/bash!${bash}/bin/bash!g"
2017-06-07 04:35:29 +01:00
'';
buildInputs = [ jdk ant python2 watchman python2Packages.pywatchman ];
nativeBuildInputs = [ makeWrapper ];
2017-06-07 04:35:29 +01:00
buildPhase = ''
ant
2019-05-01 07:13:47 +01:00
PYTHONDONTWRITEBYTECODE=true ./bin/buck build -c buck.release_version=${version} buck
'';
2017-06-07 04:35:29 +01:00
installPhase = ''
2019-04-11 14:10:00 +01:00
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]}"
'';
2017-06-07 04:35:29 +01:00
meta = with stdenv.lib; {
homepage = "https://buck.build/";
2017-06-07 04:35:29 +01:00
description = "A high-performance build tool";
maintainers = [ maintainers.jgertm maintainers.marsam ];
2017-06-07 04:35:29 +01:00
license = licenses.asl20;
platforms = platforms.all;
};
}