summary refs log tree commit diff
path: root/pkgs/tools/graphics
diff options
context:
space:
mode:
authorMaximilian Wende <dasisdormax@mailbox.org>2022-03-09 12:33:10 +0100
committerMaximilian Wende <dasisdormax@mailbox.org>2022-03-09 12:34:11 +0100
commit80f8c652832aef407c85a069c06ccdc3d0bfb931 (patch)
tree0b3a408b1f4f2f0fd7ca439491dba417330e84b3 /pkgs/tools/graphics
parent158c26ff779fefae2659d8d16a68e12f34c9e373 (diff)
downloadnixpkgs-80f8c652832aef407c85a069c06ccdc3d0bfb931.tar
nixpkgs-80f8c652832aef407c85a069c06ccdc3d0bfb931.tar.gz
nixpkgs-80f8c652832aef407c85a069c06ccdc3d0bfb931.tar.bz2
nixpkgs-80f8c652832aef407c85a069c06ccdc3d0bfb931.tar.lz
nixpkgs-80f8c652832aef407c85a069c06ccdc3d0bfb931.tar.xz
nixpkgs-80f8c652832aef407c85a069c06ccdc3d0bfb931.tar.zst
nixpkgs-80f8c652832aef407c85a069c06ccdc3d0bfb931.zip
astc-encoder: patch files to use a fixed build year
The build year is included in the help output.
See the discussion in #162133.
Diffstat (limited to 'pkgs/tools/graphics')
-rw-r--r--pkgs/tools/graphics/astc-encoder/default.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/tools/graphics/astc-encoder/default.nix b/pkgs/tools/graphics/astc-encoder/default.nix
index 09b442d59d9..cecc52b9df2 100644
--- a/pkgs/tools/graphics/astc-encoder/default.nix
+++ b/pkgs/tools/graphics/astc-encoder/default.nix
@@ -46,6 +46,12 @@ gccStdenv.mkDerivation rec {
     "-DCMAKE_BUILD_TYPE=Release"
   ];
 
+  # Set a fixed build year to display within help output (otherwise, it would be 1980)
+  postPatch = ''
+    substituteInPlace Source/cmake_core.cmake \
+      --replace 'string(TIMESTAMP astcencoder_YEAR "%Y")' 'set(astcencoder_YEAR "2022")'
+  '';
+
   # Link binaries into environment and provide 'astcenc' link
   postInstall = ''
     mv $out/astcenc $out/bin