mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-16 15:38:16 +00:00
arandr: make reproducible by setting mtime=0
This commit is contained in:
parent
b7ba7f9f45
commit
0059372ab2
15
pkgs/by-name/ar/arandr/gzip-timestamp-fix.patch
Normal file
15
pkgs/by-name/ar/arandr/gzip-timestamp-fix.patch
Normal file
@ -0,0 +1,15 @@
|
||||
--- setup.py 2025-04-01 11:24:54.530984662 +0000
|
||||
+++ setup.py 2025-04-01 13:54:46.961341548 +0000
|
||||
|
||||
@@ -111,9 +111,11 @@
|
||||
info('compressing man page to %s', gzfile)
|
||||
|
||||
if not self.dry_run:
|
||||
- compressed = gzip.open(gzfile, 'w', 9)
|
||||
- compressed.write(manpage)
|
||||
- compressed.close()
|
||||
+ with open(gzfile, 'wb') as file:
|
||||
+ with gzip.GzipFile(fileobj=file, mode='wb', filename='', mtime=0, compresslevel=9) as compressed:
|
||||
+ compressed.write(manpage)
|
||||
+ compressed.close()
|
||||
+ file.close()
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
lib,
|
||||
fetchurl,
|
||||
fetchFromGitLab,
|
||||
python3Packages,
|
||||
gobject-introspection,
|
||||
gsettings-desktop-schemas,
|
||||
@ -16,11 +17,17 @@ buildPythonApplication rec {
|
||||
pname = "arandr";
|
||||
version = "0.1.11";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://christian.amsuess.com/tools/arandr/files/${pname}-${version}.tar.gz";
|
||||
hash = "sha256-5Mu+Npi7gSs5V3CHAXS+AJS7rrOREFqBH5X0LrGCrgI=";
|
||||
src = fetchFromGitLab {
|
||||
owner = "arandr";
|
||||
repo = "arandr";
|
||||
tag = version;
|
||||
hash = "sha256-nQtfOKAnWKsy2DmvtRGJa4+Y9uGgX41BeHpd9m4d9YA=";
|
||||
};
|
||||
|
||||
# patch to set mtime=0 on setup.py
|
||||
patches = [ ./gzip-timestamp-fix.patch ];
|
||||
patchFlags = [ "-p0" ];
|
||||
|
||||
preBuild = ''
|
||||
rm -rf data/po/*
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user