diff --git a/pkgs/by-name/ya/yabai/package.nix b/pkgs/by-name/ya/yabai/package.nix index d691968aa57b..8972b1c320f0 100644 --- a/pkgs/by-name/ya/yabai/package.nix +++ b/pkgs/by-name/ya/yabai/package.nix @@ -12,7 +12,8 @@ xcodebuild, xxd, yabai, - apple-sdk_11, + apple-sdk_15, + darwinMinVersionHook, }: stdenv.mkDerivation (finalAttrs: { pname = "yabai"; @@ -30,7 +31,8 @@ stdenv.mkDerivation (finalAttrs: { ]; buildInputs = lib.optionals stdenv.hostPlatform.isx86_64 [ - apple-sdk_11 + (darwinMinVersionHook "11.0") + apple-sdk_15 ]; dontConfigure = true; @@ -58,12 +60,6 @@ stdenv.mkDerivation (finalAttrs: { --replace-fail "-arch arm64e" "" \ --replace-fail "-arch arm64" "" \ --replace-fail "clang" "${stdenv.cc.targetPrefix}clang" - - # `NSScreen::safeAreaInsets` is only available on macOS 12.0 and above, which frameworks aren't packaged. - # When a lower OS version is detected upstream just returns 0, so we can hardcode that at compile time. - # https://github.com/koekeishiya/yabai/blob/v4.0.2/src/workspace.m#L109 - substituteInPlace src/workspace.m \ - --replace-fail 'return screen.safeAreaInsets.top;' 'return 0;' ''; passthru = {