Merge pull request #307573 from NickCao/qt6-debug

qt6: drop debug and developerBuild in favor of cmakeBuildType

authored by Nick Cao and committed by GitHub ecc54070 e39c9004

-34
-6
pkgs/development/libraries/qt-6/default.nix
··· 15 , buildPackages 16 , python3 17 , config 18 - 19 - # options 20 - , developerBuild ? false 21 - , debug ? false 22 }: 23 24 let ··· 47 qtbase = callPackage ./modules/qtbase.nix { 48 withGtk3 = !stdenv.hostPlatform.isMinGW; 49 inherit (srcs.qtbase) src version; 50 - inherit developerBuild; 51 inherit (darwin.apple_sdk_11_0.frameworks) 52 AGL AVFoundation AppKit Contacts CoreBluetooth EventKit GSS MetalKit; 53 patches = [ ··· 197 name = "qmake6-hook"; 198 propagatedBuildInputs = [ qtbase.dev ]; 199 substitutions = { 200 - inherit debug; 201 fix_qmake_libtool = ./hooks/fix-qmake-libtool.sh; 202 }; 203 } ./hooks/qmake-hook.sh)
··· 15 , buildPackages 16 , python3 17 , config 18 }: 19 20 let ··· 43 qtbase = callPackage ./modules/qtbase.nix { 44 withGtk3 = !stdenv.hostPlatform.isMinGW; 45 inherit (srcs.qtbase) src version; 46 inherit (darwin.apple_sdk_11_0.frameworks) 47 AGL AVFoundation AppKit Contacts CoreBluetooth EventKit GSS MetalKit; 48 patches = [ ··· 192 name = "qmake6-hook"; 193 propagatedBuildInputs = [ qtbase.dev ]; 194 substitutions = { 195 fix_qmake_libtool = ./hooks/fix-qmake-libtool.sh; 196 }; 197 } ./hooks/qmake-hook.sh)
-6
pkgs/development/libraries/qt-6/hooks/qmake-hook.sh
··· 18 "NIX_OUTPUT_PLUGIN=${!outputBin}/${qtPluginPrefix:?}" 19 ) 20 21 - if [ -n "@debug@" ]; then 22 - qmakeFlags+=("CONFIG+=debug") 23 - else 24 - qmakeFlags+=("CONFIG+=release") 25 - fi 26 - 27 qmakeFlags+=("${qmakeFlags_orig[@]}") 28 } 29 prePhases+=" qmakePrePhase"
··· 18 "NIX_OUTPUT_PLUGIN=${!outputBin}/${qtPluginPrefix:?}" 19 ) 20 21 qmakeFlags+=("${qmakeFlags_orig[@]}") 22 } 23 prePhases+=" qmakePrePhase"
-14
pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh
··· 15 . @fix_qt_builtin_paths@ 16 . @fix_qt_module_paths@ 17 18 - # Disable debug symbols if qtbase was built without debugging. 19 - # This stops -dev paths from leaking into other outputs. 20 - if [ -z "@debug@" ]; then 21 - NIX_CFLAGS_COMPILE="${NIX_CFLAGS_COMPILE-}${NIX_CFLAGS_COMPILE:+ }-DQT_NO_DEBUG" 22 - fi 23 - 24 - # Integration with CMake: 25 - # Set the CMake build type corresponding to how qtbase was built. 26 - if [ -n "@debug@" ]; then 27 - cmakeBuildType="Debug" 28 - else 29 - cmakeBuildType="Release" 30 - fi 31 - 32 # Build tools are often confused if QMAKE is unset. 33 export QMAKE=@out@/bin/qmake 34
··· 15 . @fix_qt_builtin_paths@ 16 . @fix_qt_module_paths@ 17 18 # Build tools are often confused if QMAKE is unset. 19 export QMAKE=@out@/bin/qmake 20
-8
pkgs/development/libraries/qt-6/modules/qtbase.nix
··· 92 # options 93 , libGLSupported ? stdenv.hostPlatform.isLinux 94 , libGL 95 - , debug ? false 96 - , developerBuild ? false 97 , qttranslations ? null 98 }: 99 100 let 101 - debugSymbols = debug || developerBuild; 102 isCrossBuild = !stdenv.buildPlatform.canExecute stdenv.hostPlatform; 103 in 104 stdenv.mkDerivation rec { 105 pname = "qtbase"; 106 107 inherit src version; 108 - 109 - debug = debugSymbols; 110 111 propagatedBuildInputs = [ 112 libxml2 ··· 195 CoreBluetooth 196 ] 197 ++ lib.optional withGtk3 gtk3 198 - ++ lib.optional developerBuild gdb 199 ++ lib.optional (cups != null && lib.meta.availableOn stdenv.hostPlatform cups) cups 200 ++ lib.optional (libmysqlclient != null && !stdenv.hostPlatform.isMinGW) libmysqlclient 201 ++ lib.optional (postgresql != null && lib.meta.availableOn stdenv.hostPlatform postgresql) postgresql; ··· 265 # FIXME: not sure why this isn't added automatically? 266 patchelf --add-rpath "${libmysqlclient}/lib/mariadb" $out/${qtPluginPrefix}/sqldrivers/libqsqlmysql.so 267 ''; 268 - 269 - dontStrip = debugSymbols; 270 271 dontWrapQtApps = true; 272
··· 92 # options 93 , libGLSupported ? stdenv.hostPlatform.isLinux 94 , libGL 95 , qttranslations ? null 96 }: 97 98 let 99 isCrossBuild = !stdenv.buildPlatform.canExecute stdenv.hostPlatform; 100 in 101 stdenv.mkDerivation rec { 102 pname = "qtbase"; 103 104 inherit src version; 105 106 propagatedBuildInputs = [ 107 libxml2 ··· 190 CoreBluetooth 191 ] 192 ++ lib.optional withGtk3 gtk3 193 ++ lib.optional (cups != null && lib.meta.availableOn stdenv.hostPlatform cups) cups 194 ++ lib.optional (libmysqlclient != null && !stdenv.hostPlatform.isMinGW) libmysqlclient 195 ++ lib.optional (postgresql != null && lib.meta.availableOn stdenv.hostPlatform postgresql) postgresql; ··· 259 # FIXME: not sure why this isn't added automatically? 260 patchelf --add-rpath "${libmysqlclient}/lib/mariadb" $out/${qtPluginPrefix}/sqldrivers/libqsqlmysql.so 261 ''; 262 263 dontWrapQtApps = true; 264