hash_extender: fix gcc-15 build
Without the change the build fails on `master` as https://hydra.nixos.org/build/319912473: ``` In file included from hash_extender_engine.c:33: tiger.h:1: error: header guard '__TIGER_H_' followed by '#define' of a different macro [-Werror=header-guard] 1 | #ifndef __TIGER_H_ tiger.h:2: note: '__TIGER_H__' is defined here; did you mean '__TIGER_H_'? 2 | #define __TIGER_H__ ```
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user