blob: 020750393cd754891ed80d37b988155663ca3d7e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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;
};
}
|