From 48c910611f8a592426cbf6dee1cb3c212aa3299b Mon Sep 17 00:00:00 2001 From: Tim Jäger Date: Tue, 6 Jun 2017 20:35:29 -0700 Subject: buck: init at v2017.05.31.01 --- .../tools/build-managers/buck/default.nix | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 pkgs/development/tools/build-managers/buck/default.nix (limited to 'pkgs/development/tools/build-managers/buck/default.nix') diff --git a/pkgs/development/tools/build-managers/buck/default.nix b/pkgs/development/tools/build-managers/buck/default.nix new file mode 100644 index 00000000000..020750393cd --- /dev/null +++ b/pkgs/development/tools/build-managers/buck/default.nix @@ -0,0 +1,46 @@ + { stdenv, pkgs, fetchFromGitHub, fetchgit, jdk, ant, python2, watchman, unzip, bash }: + +stdenv.mkDerivation rec { + name = "buck-${version}"; + version = "v2017.05.31.01"; + + src = fetchFromGitHub { + owner = "facebook"; + repo = "buck"; + rev = "0b8b3828a11afa79dc128832cb55b106f07e48aa"; + sha256 = "1g3yg8qq91cdhsq7zmir7wxw3767l120f5zhq969gppdw9apqy0s"; + }; + + patches = [ ./pex-mtime.patch ]; + + postPatch = '' + for f in $(grep -l -r '/bin/bash'); do + substituteInPlace "$f" --replace '/bin/bash' '${bash}/bin/bash' + done + ''; + + buildInputs = [ jdk ant ]; + + propagatedBuildInputs = [ python2 watchman pkgs.python27Packages.pywatchman ]; + + buildPhase = + '' + ant + ./bin/buck --version + ./bin/buck build buck + ''; + + installPhase = + '' + mkdir -p $out/bin + cp buck-out/gen/programs/buck.pex $out/bin/buck + ''; + + meta = with stdenv.lib; { + homepage = https://buckbuild.com/; + description = "A high-performance build tool"; + maintainers = [ maintainers.jgertm ]; + license = licenses.asl20; + platforms = platforms.all; + }; +} -- cgit 1.4.1