From 0421ee2dd8b823e940659b4ad51fce968d036b20 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Tue, 24 Sep 2024 22:30:53 -0400 Subject: [PATCH] wine64Packages.{stable,unstable,staging}: use the 14.4 SDK Wine supports a form of futexes on Darwin when built with the 14.4 SDK and running on 14.4 or later. It will fall back automatically to other primitives when running on older systems. --- pkgs/applications/emulators/wine/base.nix | 12 +++++------- pkgs/top-level/all-packages.nix | 9 --------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/pkgs/applications/emulators/wine/base.nix b/pkgs/applications/emulators/wine/base.nix index cff069a2e75c..7c4ca01acb59 100644 --- a/pkgs/applications/emulators/wine/base.nix +++ b/pkgs/applications/emulators/wine/base.nix @@ -6,7 +6,7 @@ wineRelease, patches, moltenvk, - buildScript ? null, configureFlags ? [], mainProgram ? "wine" + buildScript ? null, configureFlags ? [], mainProgram ? "wine", }: with import ./util.nix { inherit lib; }; @@ -23,12 +23,10 @@ let }; } ./setup-hook-darwin.sh; - darwinFrameworks = lib.optionals stdenv.hostPlatform.isDarwin ( - toBuildInputs pkgArches (pkgs: with pkgs.buildPackages.darwin.apple_sdk.frameworks; [ - CoreServices Foundation ForceFeedback AppKit OpenGL IOKit DiskArbitration PCSC Security - ApplicationServices AudioToolbox CoreAudio AudioUnit CoreMIDI OpenCL Cocoa Carbon - ]) - ); + # Using the 14.4 SDK allows Wine to use `os_sync_wait_on_address` for its futex implementation on Darwin. + # It does an availability check, so older systems will still work. + darwinFrameworks = toBuildInputs pkgArches (pkgs: [ pkgs.apple-sdk_14 ]); + # Building Wine with these flags isn’t supported on Darwin. Using any of them will result in an evaluation failures # because they will put Darwin in `meta.badPlatforms`. darwinUnsupportedFlags = [ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b6744b93ea24..3769d5446479 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -38187,15 +38187,6 @@ with pkgs; winePackagesFor = wineBuild: lib.makeExtensible (self: with self; { callPackage = newScope self; - stdenv = - if pkgs.stdenv.hostPlatform.isDarwin then - # Match upstream, which builds with the latest SDK and a 10.7 deployment target. - overrideSDK pkgs.stdenv { - darwinMinVersion = "10.7"; - darwinSdkVersion = "11.0"; - } - else - pkgs.stdenv; inherit wineBuild;