Unverified Commit 6d404af7 authored by Sam's avatar Sam
Browse files

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.
parent 22f7ff4e
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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}"'