bootil: fix build with gcc 14

This commit is contained in:
Sigmanificient 2025-03-10 14:02:23 +01:00
parent 9acf0d6d08
commit a55906b595

View file

@ -3,6 +3,7 @@
stdenv,
fetchFromGitHub,
premake4,
zlib,
}:
stdenv.mkDerivation {
@ -16,12 +17,18 @@ stdenv.mkDerivation {
sha256 = "1njdj6nvmwf7j2fwqbyvd1cf5l52797vk2wnsliylqdzqcjmfpij";
};
enableParallelBuilding = true;
# Avoid guessing where files end up. Just use current directory.
postPatch = ''
substituteInPlace projects/premake4.lua \
--replace 'location ( os.get() .. "/" .. _ACTION )' 'location ( ".." )'
--replace-fail 'location ( os.get() .. "/" .. _ACTION )' 'location ( ".." )'
substituteInPlace projects/bootil.lua \
--replace 'targetdir ( "../lib/" .. os.get() .. "/" .. _ACTION )' 'targetdir ( ".." )'
--replace-fail 'targetdir ( "../lib/" .. os.get() .. "/" .. _ACTION )' 'targetdir ( ".." )'
rm src/3rdParty/zlib -rf
mkdir src/3rdParty/zlib
cp -r ${zlib.dev}/include/z{conf,lib}.h src/3rdParty/zlib
'';
nativeBuildInputs = [ premake4 ];