hash_extender: fix gcc-15 build (#493001)

This commit is contained in:
Aleksana
2026-03-06 14:35:34 +00:00
committed by GitHub
+23 -1
View File
@@ -2,6 +2,7 @@
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
openssl,
}:
@@ -16,10 +17,27 @@ stdenv.mkDerivation {
sha256 = "1fj118566hr1wv03az2w0iqknazsqqkak0mvlcvwpgr6midjqi9b";
};
patches = [
# gcc-15 build fix:
# https://github.com/iagox86/hash_extender/pull/15
(fetchpatch {
name = "gcc-15.patch";
url = "https://github.com/iagox86/hash_extender/commit/84d8d70eb10bcbe4dea2cf5a41d246d59a389e61.patch";
hash = "sha256-LCzv4FK+4WoJBYYUYB+zsC6358ZpTOxbE91W/1pFe6U=";
})
];
buildInputs = [ openssl ];
enableParallelBuilding = true;
doCheck = true;
checkPhase = "./hash_extender --test";
checkPhase = ''
runHook preCheck
./hash_extender --test
runHook postCheck
'';
# https://github.com/iagox86/hash_extender/issues/26
hardeningDisable = [ "fortify3" ];
@@ -27,8 +45,12 @@ stdenv.mkDerivation {
env.NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp hash_extender $out/bin
runHook postInstall
'';
meta = {