Skip to content

Commit

Permalink
libsForQt5.qtbase: override the Darwin deployment target correctly
Browse files Browse the repository at this point in the history
There might be a nicer way to do this, but I don’t understand qmake.
  • Loading branch information
emilazy committed Oct 28, 2024
1 parent a2d8a0e commit 18eb528
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkgs/development/libraries/qt-5/modules/qtbase.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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|" \
Expand Down

0 comments on commit 18eb528

Please sign in to comment.