From 18eb5289abd8e18eb875c4039efcaecedc92dd97 Mon Sep 17 00:00:00 2001 From: Emily Date: Mon, 28 Oct 2024 18:59:35 +0000 Subject: [PATCH] libsForQt5.qtbase: override the Darwin deployment target correctly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There might be a nicer way to do this, but I don’t understand qmake. --- pkgs/development/libraries/qt-5/modules/qtbase.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index ba318566150c26..7b4cb21d10fa66 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -44,7 +44,8 @@ let # Note that Qt propagates the 10.14 SDK instead of the 10.13 SDK to make sure that applications linked to Qt # support automatic dark mode on x86_64-darwin (see: https://developer.apple.com/documentation/appkit/nsappearancecustomization/choosing_a_specific_appearance_for_your_macos_app). propagatedAppleSDK = if lib.versionOlder (lib.getVersion apple-sdk) "10.14" then apple-sdk_10_14 else apple-sdk; - propagatedMinVersionHook = darwinMinVersionHook "10.13"; + deploymentTarget = "10.13"; + propagatedMinVersionHook = darwinMinVersionHook deploymentTarget; buildAppleSDK = apple-sdk_13; in @@ -165,7 +166,10 @@ stdenv.mkDerivation (finalAttrs: ({ --replace-fail /System/Library/Frameworks/Cocoa.framework "$SDKROOT/System/Library/Frameworks/Cocoa.framework" substituteInPlace mkspecs/common/macx.conf \ - --replace-fail 'CONFIG += ' 'CONFIG += no_default_rpath ' + --replace-fail 'CONFIG += ' 'CONFIG += no_default_rpath ' \ + --replace-fail \ + 'QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.13' \ + 'QMAKE_MACOSX_DEPLOYMENT_TARGET = ${deploymentTarget}' '' else lib.optionalString libGLSupported '' sed -i mkspecs/common/linux.conf \ -e "/^QMAKE_INCDIR_OPENGL/ s|$|${lib.getDev libGL}/include|" \