about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/build-managers/buck/pex-mtime.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/build-managers/buck/pex-mtime.patch')
-rw-r--r--nixpkgs/pkgs/development/tools/build-managers/buck/pex-mtime.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/build-managers/buck/pex-mtime.patch b/nixpkgs/pkgs/development/tools/build-managers/buck/pex-mtime.patch
new file mode 100644
index 000000000000..b8726e64a604
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/build-managers/buck/pex-mtime.patch
@@ -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)