From 7c0bcd6197ccddda5549d3dcfad7e72efc02548e Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Sun, 28 Apr 2024 18:37:05 -0400 Subject: [PATCH] qt6: drop debug and developerBuild in favor of cmakeBuildType --- pkgs/development/libraries/qt-6/default.nix | 6 ------ .../development/libraries/qt-6/hooks/qmake-hook.sh | 6 ------ .../libraries/qt-6/hooks/qtbase-setup-hook.sh | 14 -------------- pkgs/development/libraries/qt-6/modules/qtbase.nix | 8 -------- 4 files changed, 34 deletions(-) diff --git a/pkgs/development/libraries/qt-6/default.nix b/pkgs/development/libraries/qt-6/default.nix index 6604596fe468..c4b851207954 100644 --- a/pkgs/development/libraries/qt-6/default.nix +++ b/pkgs/development/libraries/qt-6/default.nix @@ -15,10 +15,6 @@ , buildPackages , python3 , config - - # options -, developerBuild ? false -, debug ? false }: let @@ -47,7 +43,6 @@ let qtbase = callPackage ./modules/qtbase.nix { withGtk3 = !stdenv.hostPlatform.isMinGW; inherit (srcs.qtbase) src version; - inherit developerBuild; inherit (darwin.apple_sdk_11_0.frameworks) AGL AVFoundation AppKit Contacts CoreBluetooth EventKit GSS MetalKit; patches = [ @@ -197,7 +192,6 @@ let name = "qmake6-hook"; propagatedBuildInputs = [ qtbase.dev ]; substitutions = { - inherit debug; fix_qmake_libtool = ./hooks/fix-qmake-libtool.sh; }; } ./hooks/qmake-hook.sh) diff --git a/pkgs/development/libraries/qt-6/hooks/qmake-hook.sh b/pkgs/development/libraries/qt-6/hooks/qmake-hook.sh index 8c4ce096443f..130e8290a3fe 100644 --- a/pkgs/development/libraries/qt-6/hooks/qmake-hook.sh +++ b/pkgs/development/libraries/qt-6/hooks/qmake-hook.sh @@ -18,12 +18,6 @@ qmakePrePhase() { "NIX_OUTPUT_PLUGIN=${!outputBin}/${qtPluginPrefix:?}" ) - if [ -n "@debug@" ]; then - qmakeFlags+=("CONFIG+=debug") - else - qmakeFlags+=("CONFIG+=release") - fi - qmakeFlags+=("${qmakeFlags_orig[@]}") } prePhases+=" qmakePrePhase" diff --git a/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh b/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh index 9bc68e6cd3d6..5006d6b65530 100644 --- a/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh +++ b/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh @@ -15,20 +15,6 @@ else # Only set up Qt once. . @fix_qt_builtin_paths@ . @fix_qt_module_paths@ - # Disable debug symbols if qtbase was built without debugging. - # This stops -dev paths from leaking into other outputs. - if [ -z "@debug@" ]; then - NIX_CFLAGS_COMPILE="${NIX_CFLAGS_COMPILE-}${NIX_CFLAGS_COMPILE:+ }-DQT_NO_DEBUG" - fi - - # Integration with CMake: - # Set the CMake build type corresponding to how qtbase was built. - if [ -n "@debug@" ]; then - cmakeBuildType="Debug" - else - cmakeBuildType="Release" - fi - # Build tools are often confused if QMAKE is unset. export QMAKE=@out@/bin/qmake diff --git a/pkgs/development/libraries/qt-6/modules/qtbase.nix b/pkgs/development/libraries/qt-6/modules/qtbase.nix index a14028e1259a..a327b88991ef 100644 --- a/pkgs/development/libraries/qt-6/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-6/modules/qtbase.nix @@ -92,13 +92,10 @@ # options , libGLSupported ? stdenv.hostPlatform.isLinux , libGL -, debug ? false -, developerBuild ? false , qttranslations ? null }: let - debugSymbols = debug || developerBuild; isCrossBuild = !stdenv.buildPlatform.canExecute stdenv.hostPlatform; in stdenv.mkDerivation rec { @@ -106,8 +103,6 @@ stdenv.mkDerivation rec { inherit src version; - debug = debugSymbols; - propagatedBuildInputs = [ libxml2 libxslt @@ -195,7 +190,6 @@ stdenv.mkDerivation rec { CoreBluetooth ] ++ lib.optional withGtk3 gtk3 - ++ lib.optional developerBuild gdb ++ lib.optional (cups != null && lib.meta.availableOn stdenv.hostPlatform cups) cups ++ lib.optional (libmysqlclient != null && !stdenv.hostPlatform.isMinGW) libmysqlclient ++ lib.optional (postgresql != null && lib.meta.availableOn stdenv.hostPlatform postgresql) postgresql; @@ -266,8 +260,6 @@ stdenv.mkDerivation rec { patchelf --add-rpath "${libmysqlclient}/lib/mariadb" $out/${qtPluginPrefix}/sqldrivers/libqsqlmysql.so ''; - dontStrip = debugSymbols; - dontWrapQtApps = true; setupHook = ../hooks/qtbase-setup-hook.sh;