glsl_analyzer: fix on x86_64-darwin

Because apple-sdk defaults to 11 on aarch64-darwin, glsl_analyzer builds
fine, but on x86_64-darwin (where apple-sdk defaults to 10.12) it fails
to build. I've bumped the SDK version to be 11 on both platforms, which
fixes the build.
This commit is contained in:
Sam 2024-11-17 22:02:39 -08:00
parent 22f7ff4eba
commit 6d404af7be
No known key found for this signature in database
GPG Key ID: 07C4B9795517E3B4

View File

@ -2,6 +2,7 @@
, stdenv
, fetchFromGitHub
, zig_0_13
, apple-sdk_11
}:
stdenv.mkDerivation (finalAttrs: {
@ -19,6 +20,12 @@ stdenv.mkDerivation (finalAttrs: {
zig_0_13.hook
];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
# The package failed to build on x86_64-darwin because the default was the 10.12 SDK
# Once the default on all platforms has been raised to the 11.0 SDK or higher, this can be removed.
apple-sdk_11
];
postPatch = ''
substituteInPlace build.zig \
--replace-fail 'b.run(&.{ "git", "describe", "--tags", "--always" })' '"${finalAttrs.src.rev}"'