parent
0011f9065a
commit
48c910611f
@ -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; |
||||
}; |
||||
} |
@ -0,0 +1,21 @@ |
||||
diff --git a/third-party/py/pex/pex/common.py b/third-party/py/pex/pex/common.py
|
||||
index 76459ce23..491dcfc0b 100644
|
||||
--- a/third-party/py/pex/pex/common.py
|
||||
+++ b/third-party/py/pex/pex/common.py
|
||||
@@ -12,6 +12,7 @@ import stat
|
||||
import sys
|
||||
import tempfile
|
||||
import threading
|
||||
+import time
|
||||
import zipfile
|
||||
from collections import defaultdict
|
||||
from uuid import uuid4
|
||||
@@ -328,4 +329,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)
|
||||
+ file = os.path.join(self.chroot, f)
|
||||
+ instant = 315532800
|
||||
+ os.utime(file, (instant, instant))
|
||||
+ zf.write(file, arcname=f, compress_type=zipfile.ZIP_DEFLATED)
|
Loading…
Reference in new issue