abbaye-des-morts: fix darwin build

This commit is contained in:
DontEatOreo 2025-08-03 16:59:38 +03:00
parent acca62bcd1
commit 67ab5122c1
No known key found for this signature in database

View File

@ -27,11 +27,15 @@ stdenv.mkDerivation (finalAttrs: {
makeFlags = [
"PREFIX=${placeholder "out"}"
"DESTDIR="
];
]
++ lib.optional stdenv.isDarwin "PLATFORM=mac";
preBuild = lib.optionalString stdenv.cc.isClang ''
# Even with PLATFORM=mac, the Makefile specifies some GCC-specific CFLAGS that
# are not supported by modern Clang on macOS
postPatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace Makefile \
--replace -fpredictive-commoning ""
--replace-fail "-funswitch-loops" "" \
--replace-fail "-fgcse-after-reload" ""
'';
meta = {