keyutils: inline patch to improve reproducibility

switch to using SOURCE_DATE_EPOCH instead of BUILDDATE

Artturin e69fd090 27a4e527

+8 -6
+8 -6
pkgs/os-specific/linux/keyutils/default.nix
··· 15 }; 16 17 patches = [ 18 - (fetchurl { 19 - # improve reproducibility 20 - url = "https://salsa.debian.org/debian/keyutils/raw/4cecffcb8e2a2aa4ef41777ed40e4e4bcfb2e5bf/debian/patches/Make-build-reproducible.patch"; 21 - sha256 = "0wnvbjfrbk7rghd032z684l7vk7mhy3bd41zvhkrhgp3cd5id0bm"; 22 - }) 23 ./conf-symlink.patch 24 # This patch solves a duplicate symbol error when building with a clang stdenv 25 # Before removing this patch, please ensure the package still builds by running eg. ··· 29 30 makeFlags = lib.optionals stdenv.hostPlatform.isStatic "NO_SOLIB=1"; 31 32 - BUILDDATE = "1970-01-01"; 33 outputs = [ "out" "lib" "dev" ]; 34 35 enableParallelBuilding = true; 36
··· 15 }; 16 17 patches = [ 18 ./conf-symlink.patch 19 # This patch solves a duplicate symbol error when building with a clang stdenv 20 # Before removing this patch, please ensure the package still builds by running eg. ··· 24 25 makeFlags = lib.optionals stdenv.hostPlatform.isStatic "NO_SOLIB=1"; 26 27 outputs = [ "out" "lib" "dev" ]; 28 + 29 + postPatch = '' 30 + # https://github.com/archlinux/svntogit-packages/blob/packages/keyutils/trunk/reproducible.patch 31 + substituteInPlace Makefile \ 32 + --replace \ 33 + 'VCPPFLAGS := -DPKGBUILD="\"$(shell date -u +%F)\""' \ 34 + 'VCPPFLAGS := -DPKGBUILD="\"$(date -ud "@$SOURCE_DATE_EPOCH" +%F)\""' 35 + ''; 36 37 enableParallelBuilding = true; 38