nixpkgs/pkgs/development/tools/build-managers/buck/default.nix
R. RyanTM 7c93929d3d buck: 2019.06.17.01 -> 2019.09.12.01
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/buck/versions
2019-09-26 04:32:44 -07:00

44 lines
1.2 KiB
Nix

{ stdenv, fetchFromGitHub, jdk, ant, python2, python2Packages, watchman, bash, makeWrapper }:
stdenv.mkDerivation rec {
pname = "buck";
version = "2019.09.12.01";
src = fetchFromGitHub {
owner = "facebook";
repo = pname;
rev = "v${version}";
sha256 = "02rid0r0swxa6n6hl89lcll7hgxn1wjh2kjzxcj4arm7d34243bw";
};
patches = [ ./pex-mtime.patch ];
postPatch = ''
grep -l -r '/bin/bash' --null | xargs -0 sed -i -e "s!/bin/bash!${bash}/bin/bash!g"
'';
buildInputs = [ jdk ant python2 watchman python2Packages.pywatchman ];
nativeBuildInputs = [ makeWrapper ];
buildPhase = ''
ant
PYTHONDONTWRITEBYTECODE=true ./bin/buck build -c buck.release_version=${version} 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 [jdk watchman]}"
'';
meta = with stdenv.lib; {
homepage = "https://buck.build/";
description = "A high-performance build tool";
maintainers = [ maintainers.jgertm maintainers.marsam ];
license = licenses.asl20;
platforms = platforms.all;
};
}