mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 21:33:03 +03:00
Merge pull request #26438 from jgertm/jgertm/buck
buck: init at v2017.05.31.01
This commit is contained in:
commit
ff139c49f7
42
pkgs/development/tools/build-managers/buck/default.nix
Normal file
42
pkgs/development/tools/build-managers/buck/default.nix
Normal file
@ -0,0 +1,42 @@
|
||||
{ stdenv, fetchFromGitHub, jdk, ant, python2, python2Packages, watchman, unzip, bash, makeWrapper }:
|
||||
|
||||
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 = ''
|
||||
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
|
||||
./bin/buck build 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://buckbuild.com/;
|
||||
description = "A high-performance build tool";
|
||||
maintainers = [ maintainers.jgertm ];
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
13
pkgs/development/tools/build-managers/buck/pex-mtime.patch
Normal file
13
pkgs/development/tools/build-managers/buck/pex-mtime.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/third-party/py/pex/pex/common.py b/third-party/py/pex/pex/common.py
|
||||
index 76459ce23..eff411b20 100644
|
||||
--- a/third-party/py/pex/pex/common.py
|
||||
+++ b/third-party/py/pex/pex/common.py
|
||||
@@ -328,4 +328,7 @@ class Chroot(object):
|
||||
def zip(self, filename, mode='wb'):
|
||||
with contextlib.closing(zipfile.ZipFile(filename, mode)) as zf:
|
||||
for f in sorted(self.files()):
|
||||
- zf.write(os.path.join(self.chroot, f), arcname=f, compress_type=zipfile.ZIP_DEFLATED)
|
||||
+ path = os.path.join(self.chroot, f)
|
||||
+ instant = 615532801
|
||||
+ os.utime(path, (instant, instant))
|
||||
+ zf.write(path, arcname=f, compress_type=zipfile.ZIP_DEFLATED)
|
@ -6523,6 +6523,8 @@ with pkgs;
|
||||
wxGTK = wxGTK30;
|
||||
};
|
||||
|
||||
buck = callPackage ../development/tools/build-managers/buck { };
|
||||
|
||||
buildbot = callPackage ../development/tools/build-managers/buildbot {
|
||||
pythonPackages = python2Packages;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user