Skip to content

Commit b00e3c0

Browse files
niklaskorzvcunat
authored andcommitted
qt6: prevent Xcode version sniffing
Qt tries to detect the running Xcode version through `xcrun xcodebuild -version`. This fails when xcbuild is not included in the dependencies, and is also unnecessary as the value is only used for the Xcode min version check that we explicitly disable already. (cherry picked from commit e34775b) https://hydra.nixos.org/build/300813628/nixlog/1/tail
1 parent a2aa28e commit b00e3c0

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

pkgs/development/libraries/qt-6/modules/qtbase/default.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,10 @@ stdenv.mkDerivation rec {
271271
++ lib.optionals stdenv.hostPlatform.isDarwin [
272272
"-DQT_FEATURE_rpath=OFF"
273273
"-DQT_NO_XCODE_MIN_VERSION_CHECK=ON"
274+
# This is only used for the min version check, which we disabled above.
275+
# When this variable is not set, cmake tries to execute xcodebuild
276+
# to query the version.
277+
"-DQT_INTERNAL_XCODE_VERSION=0.1"
274278
]
275279
++ lib.optionals isCrossBuild [
276280
"-DQT_HOST_PATH=${pkgsBuildBuild.qt6.qtbase}"

pkgs/development/libraries/qt-6/qtModule.nix

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,13 @@ stdenv.mkDerivation (
4242
# don't leak OS version into the final output
4343
# https://bugreports.qt.io/browse/QTBUG-136060
4444
[ "-DCMAKE_SYSTEM_VERSION=" ]
45-
++ lib.optional stdenv.hostPlatform.isDarwin "-DQT_NO_XCODE_MIN_VERSION_CHECK=ON"
45+
++ lib.optionals stdenv.hostPlatform.isDarwin [
46+
"-DQT_NO_XCODE_MIN_VERSION_CHECK=ON"
47+
# This is only used for the min version check, which we disabled above.
48+
# When this variable is not set, cmake tries to execute xcodebuild
49+
# to query the version.
50+
"-DQT_INTERNAL_XCODE_VERSION=0.1"
51+
]
4652
++ args.cmakeFlags or [ ];
4753

4854
moveToDev = false;

0 commit comments

Comments
 (0)