odin: Fix arm64-apple-darwin builds (#429353)

This commit is contained in:
Aleksana
2025-08-01 16:01:25 +08:00
committed by GitHub
+8
View File
@@ -29,7 +29,15 @@ stdenv.mkDerivation (finalAttrs: {
# which can be provided by a pure Nix expression, for example in a shell.
./system-raylib.patch
];
postPatch = ''
# Odin is still using 'arm64-apple-macos' as the target name on
# aarch64-darwin architectures. This results in a warning whenever the
# Odin compiler runs a build. Replacing the target in the Odin compiler
# removes the nix warning when the Odin compiler is ran on aarch64-darwin.
substituteInPlace src/build_settings.cpp \
--replace-fail "arm64-apple-macosx" "arm64-apple-darwin"
rm -r vendor/raylib/{linux,macos,macos-arm64,wasm,windows}
patchShebangs --build build_odin.sh