From 6d404af7beee626c3c4c517b6485184eecbf933e Mon Sep 17 00:00:00 2001 From: Sam <30577766+Samasaur1@users.noreply.github.com> Date: Sun, 17 Nov 2024 22:02:39 -0800 Subject: [PATCH] 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. --- pkgs/by-name/gl/glsl_analyzer/package.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/by-name/gl/glsl_analyzer/package.nix b/pkgs/by-name/gl/glsl_analyzer/package.nix index 03f0cadd3bd5..868ff99d3888 100644 --- a/pkgs/by-name/gl/glsl_analyzer/package.nix +++ b/pkgs/by-name/gl/glsl_analyzer/package.nix @@ -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}"'