bootil: fix build with gcc 14 (#388680)

This commit is contained in:
Sandro
2025-03-23 00:28:54 +01:00
committed by GitHub
+9 -2
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 ];