summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@mailbox.org>2021-01-26 16:24:41 -0600
committerGitHub <noreply@github.com>2021-01-26 16:24:41 -0600
commit0e418a1a18e14b0c6bc62554c0f4c4eff2e9d4e6 (patch)
treef99b33906ce1ef4ec91eeff358e65954bde1d21a /pkgs/development
parenta3b529a4606779b8351cde31f9877496cc188f18 (diff)
parent13e3ec0d58a510742bb12f26d7c451ca4c94ce25 (diff)
Merge pull request #108888 from ttuegel/feature--staging--qt-no-mkDerivation
Qt: Do not require mkDerivation
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/interpreters/supercollider/default.nix2
-rw-r--r--pkgs/development/libraries/aqbanking/gwenhywfar.nix2
-rw-r--r--pkgs/development/libraries/audio/suil/default.nix2
-rw-r--r--pkgs/development/libraries/dxflib/default.nix1
-rw-r--r--pkgs/development/libraries/g2o/default.nix2
-rw-r--r--pkgs/development/libraries/gecode/default.nix1
-rw-r--r--pkgs/development/libraries/gpgme/default.nix2
-rw-r--r--pkgs/development/libraries/kpmcore/default.nix2
-rw-r--r--pkgs/development/libraries/libcommuni/default.nix2
-rw-r--r--pkgs/development/libraries/libdbusmenu-qt/default.nix2
-rw-r--r--pkgs/development/libraries/libdbusmenu-qt/qt-5.5.nix2
-rw-r--r--pkgs/development/libraries/libkeyfinder/default.nix2
-rw-r--r--pkgs/development/libraries/libktorrent/default.nix2
-rw-r--r--pkgs/development/libraries/liblastfm/default.nix2
-rw-r--r--pkgs/development/libraries/libqglviewer/default.nix2
-rw-r--r--pkgs/development/libraries/opencsg/default.nix2
-rw-r--r--pkgs/development/libraries/phonon/backends/gstreamer.nix2
-rw-r--r--pkgs/development/libraries/phonon/backends/vlc.nix2
-rw-r--r--pkgs/development/libraries/phonon/default.nix2
-rw-r--r--pkgs/development/libraries/polkit-qt-1/qt-5.nix2
-rw-r--r--pkgs/development/libraries/poppler/0.61.nix2
-rw-r--r--pkgs/development/libraries/poppler/default.nix2
-rw-r--r--pkgs/development/libraries/pyotherside/default.nix2
-rw-r--r--pkgs/development/libraries/python-qt/default.nix2
-rw-r--r--pkgs/development/libraries/qca-qt5/default.nix2
-rw-r--r--pkgs/development/libraries/qmlbox2d/default.nix1
-rw-r--r--pkgs/development/libraries/qmltermwidget/default.nix2
-rw-r--r--pkgs/development/libraries/qoauth/default.nix2
-rw-r--r--pkgs/development/libraries/qscintilla/default.nix1
-rw-r--r--pkgs/development/libraries/qt-5/5.12/default.nix3
-rw-r--r--pkgs/development/libraries/qt-5/5.14/default.nix3
-rw-r--r--pkgs/development/libraries/qt-5/5.15/default.nix1
-rw-r--r--pkgs/development/libraries/qt-5/hooks/qmake-hook.sh12
-rw-r--r--pkgs/development/libraries/qt-5/hooks/qtbase-setup-hook.sh46
-rw-r--r--pkgs/development/libraries/qt-5/hooks/wrap-qt-apps-hook.sh5
-rw-r--r--pkgs/development/libraries/qt-5/mkDerivation.nix15
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtbase.nix6
-rw-r--r--pkgs/development/libraries/qt-5/qtModule.nix2
-rw-r--r--pkgs/development/libraries/qtinstaller/default.nix1
-rw-r--r--pkgs/development/libraries/qtkeychain/default.nix2
-rw-r--r--pkgs/development/libraries/qtpbfimageplugin/default.nix2
-rw-r--r--pkgs/development/libraries/qtutilities/default.nix2
-rw-r--r--pkgs/development/libraries/qtwebkit-plugins/default.nix2
-rw-r--r--pkgs/development/libraries/quazip/default.nix2
-rw-r--r--pkgs/development/libraries/qwt/6.nix2
-rw-r--r--pkgs/development/libraries/soqt/default.nix2
-rw-r--r--pkgs/development/libraries/telepathy/qt/default.nix2
-rw-r--r--pkgs/development/libraries/vtk/generic.nix2
-rw-r--r--pkgs/development/python-modules/ovito/default.nix2
-rw-r--r--pkgs/development/python-modules/pivy/default.nix3
-rw-r--r--pkgs/development/python-modules/poppler-qt5/default.nix2
-rw-r--r--pkgs/development/python-modules/pyqt/5.x.nix2
-rw-r--r--pkgs/development/python-modules/pyqtwebengine/default.nix2
-rw-r--r--pkgs/development/python-modules/pyside/default.nix2
-rw-r--r--pkgs/development/python-modules/pyside2-tools/default.nix2
-rw-r--r--pkgs/development/python-modules/pyside2/default.nix2
-rw-r--r--pkgs/development/python-modules/qscintilla-qt5/default.nix2
-rw-r--r--pkgs/development/python-modules/roboschool/default.nix2
-rw-r--r--pkgs/development/python-modules/shiboken2/default.nix2
-rw-r--r--pkgs/development/tools/analysis/panopticon/default.nix2
-rw-r--r--pkgs/development/tools/analysis/qcachegrind/default.nix2
-rw-r--r--pkgs/development/tools/build-managers/cmake/default.nix5
-rw-r--r--pkgs/development/tools/build-managers/qbs/default.nix2
-rw-r--r--pkgs/development/tools/minizinc/ide.nix1
-rw-r--r--pkgs/development/tools/misc/kdbg/default.nix2
-rw-r--r--pkgs/development/tools/phantomjs2/default.nix2
-rw-r--r--pkgs/development/tools/rgp/default.nix2
67 files changed, 185 insertions, 22 deletions
diff --git a/pkgs/development/interpreters/supercollider/default.nix b/pkgs/development/interpreters/supercollider/default.nix
index f80e18c7bb96d..a1612680b2563 100644
--- a/pkgs/development/interpreters/supercollider/default.nix
+++ b/pkgs/development/interpreters/supercollider/default.nix
@@ -31,6 +31,8 @@ stdenv.mkDerivation rec {
       ++ optional (!stdenv.isDarwin) alsaLib
       ++ optional useSCEL emacs;
 
+  dontWrapQtApps = true;
+
   meta = with lib; {
     description = "Programming language for real time audio synthesis";
     homepage = "https://supercollider.github.io";
diff --git a/pkgs/development/libraries/aqbanking/gwenhywfar.nix b/pkgs/development/libraries/aqbanking/gwenhywfar.nix
index d240e7e3a9dc7..073ad3254a0b8 100644
--- a/pkgs/development/libraries/aqbanking/gwenhywfar.nix
+++ b/pkgs/development/libraries/aqbanking/gwenhywfar.nix
@@ -57,6 +57,8 @@ in stdenv.mkDerivation rec {
 
   buildInputs = [ gtk2 gtk3 qt5.qtbase gnutls openssl libgcrypt libgpgerror ];
 
+  dontWrapQtApps = true;
+
   meta = with lib; {
     description = "OS abstraction functions used by aqbanking and related tools";
     homepage = "http://www2.aquamaniac.de/sites/download/packages.php?package=01&showall=1";
diff --git a/pkgs/development/libraries/audio/suil/default.nix b/pkgs/development/libraries/audio/suil/default.nix
index 0f4dd0f62c470..56008ae8dd6a1 100644
--- a/pkgs/development/libraries/audio/suil/default.nix
+++ b/pkgs/development/libraries/audio/suil/default.nix
@@ -22,6 +22,8 @@ stdenv.mkDerivation rec {
     ++ (lib.optionals withQt4 [ qt4 ])
     ++ (lib.optionals withQt5 (with qt5; [ qtbase qttools ]));
 
+  dontWrapQtApps = true;
+
   meta = with lib; {
     homepage = "http://drobilla.net/software/suil";
     description = "A lightweight C library for loading and wrapping LV2 plugin UIs";
diff --git a/pkgs/development/libraries/dxflib/default.nix b/pkgs/development/libraries/dxflib/default.nix
index b2cd97398c619..09f2ad3ccad68 100644
--- a/pkgs/development/libraries/dxflib/default.nix
+++ b/pkgs/development/libraries/dxflib/default.nix
@@ -13,6 +13,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [
     qmake
   ];
+  dontWrapQtApps = true;
   preConfigure = ''
     sed -i 's/CONFIG += staticlib/CONFIG += shared/' dxflib.pro
   '';
diff --git a/pkgs/development/libraries/g2o/default.nix b/pkgs/development/libraries/g2o/default.nix
index 675d994cf0e6b..6e32db59de4a4 100644
--- a/pkgs/development/libraries/g2o/default.nix
+++ b/pkgs/development/libraries/g2o/default.nix
@@ -23,6 +23,8 @@ mkDerivation rec {
   # Silence noisy warning
   CXXFLAGS = "-Wno-deprecated-copy";
 
+  dontWrapQtApps = true;
+
   cmakeFlags = [
     # Detection script is broken
     "-DQGLVIEWER_INCLUDE_DIR=${libqglviewer}/include/QGLViewer"
diff --git a/pkgs/development/libraries/gecode/default.nix b/pkgs/development/libraries/gecode/default.nix
index 46b13e6e37f53..fc9835d85db5d 100644
--- a/pkgs/development/libraries/gecode/default.nix
+++ b/pkgs/development/libraries/gecode/default.nix
@@ -12,6 +12,7 @@ stdenv.mkDerivation rec {
   };
 
   enableParallelBuilding = true;
+  dontWrapQtApps = true;
   nativeBuildInputs = [ bison flex ];
   buildInputs = [ perl gmp mpfr ]
     ++ lib.optional enableGist qtbase;
diff --git a/pkgs/development/libraries/gpgme/default.nix b/pkgs/development/libraries/gpgme/default.nix
index 5b24955af437c..8a448759c7f6a 100644
--- a/pkgs/development/libraries/gpgme/default.nix
+++ b/pkgs/development/libraries/gpgme/default.nix
@@ -50,6 +50,8 @@ stdenv.mkDerivation rec {
 
   depsBuildBuild = [ buildPackages.stdenv.cc ];
 
+  dontWrapQtApps = true;
+
   configureFlags = [
     "--enable-fixed-path=${gnupg}/bin"
     "--with-libgpg-error-prefix=${libgpgerror.dev}"
diff --git a/pkgs/development/libraries/kpmcore/default.nix b/pkgs/development/libraries/kpmcore/default.nix
index 837333407b29b..315a38197a1f1 100644
--- a/pkgs/development/libraries/kpmcore/default.nix
+++ b/pkgs/development/libraries/kpmcore/default.nix
@@ -24,6 +24,8 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ extra-cmake-modules ];
 
+  dontWrapQtApps = true;
+
   meta = with lib; {
     maintainers = with lib.maintainers; [ peterhoeg ];
     # The build requires at least Qt 5.14:
diff --git a/pkgs/development/libraries/libcommuni/default.nix b/pkgs/development/libraries/libcommuni/default.nix
index 47360e11bc5e7..cdc716731fa19 100644
--- a/pkgs/development/libraries/libcommuni/default.nix
+++ b/pkgs/development/libraries/libcommuni/default.nix
@@ -21,6 +21,8 @@ stdenv.mkDerivation rec {
   dontUseQmakeConfigure = true;
   configureFlags = [ "-config" "release" ];
 
+  dontWrapQtApps = true;
+
   preConfigure = ''
     sed -i -e 's|/bin/pwd|pwd|g' configure
   '';
diff --git a/pkgs/development/libraries/libdbusmenu-qt/default.nix b/pkgs/development/libraries/libdbusmenu-qt/default.nix
index e44f3e37d2001..75d4f76b31ffa 100644
--- a/pkgs/development/libraries/libdbusmenu-qt/default.nix
+++ b/pkgs/development/libraries/libdbusmenu-qt/default.nix
@@ -20,6 +20,8 @@ stdenv.mkDerivation {
 
   cmakeFlags = [ "-DWITH_DOC=OFF" ];
 
+  dontWrapQtApps = true;
+
   meta = with lib; {
     description = "Provides a Qt implementation of the DBusMenu spec";
     inherit homepage;
diff --git a/pkgs/development/libraries/libdbusmenu-qt/qt-5.5.nix b/pkgs/development/libraries/libdbusmenu-qt/qt-5.5.nix
index 5ce811e9fea24..7219bcbdeb5ac 100644
--- a/pkgs/development/libraries/libdbusmenu-qt/qt-5.5.nix
+++ b/pkgs/development/libraries/libdbusmenu-qt/qt-5.5.nix
@@ -15,6 +15,8 @@ stdenv.mkDerivation rec {
 
   cmakeFlags = [ "-DWITH_DOC=OFF" ];
 
+  dontWrapQtApps = true;
+
   meta = with lib; {
     homepage = "https://launchpad.net/libdbusmenu-qt";
     description = "Provides a Qt implementation of the DBusMenu spec";
diff --git a/pkgs/development/libraries/libkeyfinder/default.nix b/pkgs/development/libraries/libkeyfinder/default.nix
index d2aecccdedffa..a38fa0dc6f671 100644
--- a/pkgs/development/libraries/libkeyfinder/default.nix
+++ b/pkgs/development/libraries/libkeyfinder/default.nix
@@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ qmake ];
   buildInputs = [ fftw qtbase ];
 
+  dontWrapQtApps = true;
+
   postPatch = ''
     substituteInPlace LibKeyFinder.pro \
       --replace "/usr/local" "$out" \
diff --git a/pkgs/development/libraries/libktorrent/default.nix b/pkgs/development/libraries/libktorrent/default.nix
index 610efa7ed4f4c..825fe87fe2fe4 100644
--- a/pkgs/development/libraries/libktorrent/default.nix
+++ b/pkgs/development/libraries/libktorrent/default.nix
@@ -27,6 +27,8 @@ in stdenv.mkDerivation rec {
     inherit mainVersion;
   };
 
+  dontWrapQtApps = true;
+
   meta = with lib; {
     description = "A BitTorrent library used by KTorrent";
     homepage    = "https://www.kde.org/applications/internet/ktorrent/";
diff --git a/pkgs/development/libraries/liblastfm/default.nix b/pkgs/development/libraries/liblastfm/default.nix
index 10cdb3014791c..5183c47bc061a 100644
--- a/pkgs/development/libraries/liblastfm/default.nix
+++ b/pkgs/development/libraries/liblastfm/default.nix
@@ -23,6 +23,8 @@ stdenv.mkDerivation rec {
   buildInputs = [ fftwSinglePrec libsamplerate qtbase ]
     ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.SystemConfiguration;
 
+  dontWrapQtApps = true;
+
   meta = with lib; {
     homepage = "https://github.com/lastfm/liblastfm";
     repositories.git = "git://github.com/lastfm/liblastfm.git";
diff --git a/pkgs/development/libraries/libqglviewer/default.nix b/pkgs/development/libraries/libqglviewer/default.nix
index 4fc50f2073092..65d7a83a8384f 100644
--- a/pkgs/development/libraries/libqglviewer/default.nix
+++ b/pkgs/development/libraries/libqglviewer/default.nix
@@ -13,6 +13,8 @@ stdenv.mkDerivation rec {
   buildInputs = [ qtbase libGLU ]
     ++ lib.optional stdenv.isDarwin AGL;
 
+  dontWrapQtApps = true;
+
   postPatch = ''
     cd QGLViewer
   '';
diff --git a/pkgs/development/libraries/opencsg/default.nix b/pkgs/development/libraries/opencsg/default.nix
index 53adbdf414f7c..7625db9a59533 100644
--- a/pkgs/development/libraries/opencsg/default.nix
+++ b/pkgs/development/libraries/opencsg/default.nix
@@ -33,6 +33,8 @@ stdenv.mkDerivation rec {
     rmdir $out/bin || true
   '';
 
+  dontWrapQtApps = true;
+
   postFixup = lib.optionalString stdenv.isDarwin ''
     app=$out/Applications/opencsgexample.app/Contents/MacOS/opencsgexample
     install_name_tool -change \
diff --git a/pkgs/development/libraries/phonon/backends/gstreamer.nix b/pkgs/development/libraries/phonon/backends/gstreamer.nix
index 249ce4e3629ad..3e21415b4c772 100644
--- a/pkgs/development/libraries/phonon/backends/gstreamer.nix
+++ b/pkgs/development/libraries/phonon/backends/gstreamer.nix
@@ -26,6 +26,8 @@ stdenv.mkDerivation rec {
   # on system paths being set.
   patches = [ ./gst-plugin-paths.patch ];
 
+  dontWrapQtApps = true;
+
   NIX_CFLAGS_COMPILE =
     let gstPluginPaths =
           lib.makeSearchPathOutput "lib" "/lib/gstreamer-1.0"
diff --git a/pkgs/development/libraries/phonon/backends/vlc.nix b/pkgs/development/libraries/phonon/backends/vlc.nix
index 07e6ccf1f3460..b874c2e1d01d9 100644
--- a/pkgs/development/libraries/phonon/backends/vlc.nix
+++ b/pkgs/development/libraries/phonon/backends/vlc.nix
@@ -35,6 +35,8 @@ stdenv.mkDerivation rec {
     extra-cmake-modules
   ];
 
+  dontWrapQtApps = true;
+
   cmakeFlags = [
     "-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}"
   ];
diff --git a/pkgs/development/libraries/phonon/default.nix b/pkgs/development/libraries/phonon/default.nix
index 88a6af658dd40..877bf973194a2 100644
--- a/pkgs/development/libraries/phonon/default.nix
+++ b/pkgs/development/libraries/phonon/default.nix
@@ -58,6 +58,8 @@ stdenv.mkDerivation rec {
     "-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}"
   ];
 
+  dontWrapQtApps = true;
+
   preConfigure = ''
     cmakeFlags+=" -DPHONON_QT_MKSPECS_INSTALL_DIR=''${!outputDev}/mkspecs"
     cmakeFlags+=" -DPHONON_QT_IMPORTS_INSTALL_DIR=''${!outputBin}/$qtQmlPrefix"
diff --git a/pkgs/development/libraries/polkit-qt-1/qt-5.nix b/pkgs/development/libraries/polkit-qt-1/qt-5.nix
index be425b394019d..c4918d9d8e97e 100644
--- a/pkgs/development/libraries/polkit-qt-1/qt-5.nix
+++ b/pkgs/development/libraries/polkit-qt-1/qt-5.nix
@@ -16,6 +16,8 @@ stdenv.mkDerivation {
 
   propagatedBuildInputs = [ polkit glib qtbase ];
 
+  dontWrapQtApps = true;
+
   postFixup = ''
     # Fix library location in CMake module
     sed -i "$dev/lib/cmake/PolkitQt5-1/PolkitQt5-1Config.cmake" \
diff --git a/pkgs/development/libraries/poppler/0.61.nix b/pkgs/development/libraries/poppler/0.61.nix
index a49bfad7ab314..9b89283972dd3 100644
--- a/pkgs/development/libraries/poppler/0.61.nix
+++ b/pkgs/development/libraries/poppler/0.61.nix
@@ -53,6 +53,8 @@ stdenv.mkDerivation rec {
     (mkFlag qt5Support "QT5")
   ];
 
+  dontWrapQtApps = true;
+
   meta = with lib; {
     homepage = "https://poppler.freedesktop.org/";
     description = "A PDF rendering library";
diff --git a/pkgs/development/libraries/poppler/default.nix b/pkgs/development/libraries/poppler/default.nix
index f75c8c1474fe3..f3fae283e87c7 100644
--- a/pkgs/development/libraries/poppler/default.nix
+++ b/pkgs/development/libraries/poppler/default.nix
@@ -38,6 +38,8 @@ stdenv.mkDerivation rec {
     sed -i -e '1i cmake_policy(SET CMP0025 NEW)' CMakeLists.txt
   '';
 
+  dontWrapQtApps = true;
+
   cmakeFlags = [
     (mkFlag true "UNSTABLE_API_ABI_HEADERS") # previously "XPDF_HEADERS"
     (mkFlag (!minimal) "GLIB")
diff --git a/pkgs/development/libraries/pyotherside/default.nix b/pkgs/development/libraries/pyotherside/default.nix
index 58d38651a7607..da327ae13fac7 100644
--- a/pkgs/development/libraries/pyotherside/default.nix
+++ b/pkgs/development/libraries/pyotherside/default.nix
@@ -17,6 +17,8 @@ stdenv.mkDerivation rec {
     python3 qtbase qtquickcontrols qtsvg ncurses
   ];
 
+  dontWrapQtApps = true;
+
   patches = [ ./qml-path.patch ];
   installTargets = [ "sub-src-install_subtargets" ];
 
diff --git a/pkgs/development/libraries/python-qt/default.nix b/pkgs/development/libraries/python-qt/default.nix
index bd778f1a945d5..0fe0806b1ebeb 100644
--- a/pkgs/development/libraries/python-qt/default.nix
+++ b/pkgs/development/libraries/python-qt/default.nix
@@ -22,6 +22,8 @@ stdenv.mkDerivation rec {
                  "PYTHON_PATH=${python}/bin"
                  "PYTHON_LIB=${python}/lib"];
 
+  dontWrapQtApps = true;
+
   unpackCmd = "unzip $src";
 
   installPhase = ''
diff --git a/pkgs/development/libraries/qca-qt5/default.nix b/pkgs/development/libraries/qca-qt5/default.nix
index d1b545884b536..e53404557fba2 100644
--- a/pkgs/development/libraries/qca-qt5/default.nix
+++ b/pkgs/development/libraries/qca-qt5/default.nix
@@ -12,6 +12,8 @@ stdenv.mkDerivation rec {
   buildInputs = [ openssl qtbase ];
   nativeBuildInputs = [ cmake pkg-config ];
 
+  dontWrapQtApps = true;
+
   # Without this patch cmake fails with a "No known features for CXX compiler"
   # error on darwin
   patches = lib.optional stdenv.isDarwin ./move-project.patch ;
diff --git a/pkgs/development/libraries/qmlbox2d/default.nix b/pkgs/development/libraries/qmlbox2d/default.nix
index 88c945430451f..f5257ad0e8ef7 100644
--- a/pkgs/development/libraries/qmlbox2d/default.nix
+++ b/pkgs/development/libraries/qmlbox2d/default.nix
@@ -9,6 +9,7 @@ stdenv.mkDerivation {
   };
 
   enableParallelBuilding = true;
+  dontWrapQtApps = true;
   nativeBuildInputs = [ qmake ];
 
   buildInputs = [ qtdeclarative ];
diff --git a/pkgs/development/libraries/qmltermwidget/default.nix b/pkgs/development/libraries/qmltermwidget/default.nix
index 75f95a53800a8..7914af08df6dd 100644
--- a/pkgs/development/libraries/qmltermwidget/default.nix
+++ b/pkgs/development/libraries/qmltermwidget/default.nix
@@ -32,6 +32,8 @@ stdenv.mkDerivation {
 
   enableParallelBuilding = true;
 
+  dontWrapQtApps = true;
+
   meta = {
     description = "A QML port of qtermwidget";
     homepage = "https://github.com/Swordfish90/qmltermwidget";
diff --git a/pkgs/development/libraries/qoauth/default.nix b/pkgs/development/libraries/qoauth/default.nix
index 8afa19c229fa2..2b0be6f0b3dd5 100644
--- a/pkgs/development/libraries/qoauth/default.nix
+++ b/pkgs/development/libraries/qoauth/default.nix
@@ -21,6 +21,8 @@ stdenv.mkDerivation {
   NIX_CFLAGS_COMPILE = "-I${qca-qt5}/include/Qca-qt5/QtCrypto";
   NIX_LDFLAGS = "-lqca-qt5";
 
+  dontWrapQtApps = true;
+
   meta = with lib; {
     description = "Qt library for OAuth authentication";
     inherit (qtbase.meta) platforms;
diff --git a/pkgs/development/libraries/qscintilla/default.nix b/pkgs/development/libraries/qscintilla/default.nix
index 26a3c2e36d3b6..314bdabdb558a 100644
--- a/pkgs/development/libraries/qscintilla/default.nix
+++ b/pkgs/development/libraries/qscintilla/default.nix
@@ -35,6 +35,7 @@ in stdenv.mkDerivation rec {
   '';
 
   enableParallelBuilding = true;
+  dontWrapQtApps = true;
 
   postPatch = ''
     substituteInPlace qscintilla.pro \
diff --git a/pkgs/development/libraries/qt-5/5.12/default.nix b/pkgs/development/libraries/qt-5/5.12/default.nix
index cf5a0de11ad11..e55b66d626a7b 100644
--- a/pkgs/development/libraries/qt-5/5.12/default.nix
+++ b/pkgs/development/libraries/qt-5/5.12/default.nix
@@ -145,7 +145,7 @@ let
         patches = patches.qtbase;
         inherit bison cups harfbuzz libGL;
         withGtk3 = true; inherit dconf gtk3;
-        inherit developerBuild decryptSslTraffic;
+        inherit debug developerBuild decryptSslTraffic;
       };
 
       qtcharts = callPackage ../modules/qtcharts.nix {};
@@ -197,6 +197,7 @@ let
       qmake = makeSetupHook {
         deps = [ self.qtbase.dev ];
         substitutions = {
+          inherit debug;
           fix_qmake_libtool = ../hooks/fix-qmake-libtool.sh;
         };
       } ../hooks/qmake-hook.sh;
diff --git a/pkgs/development/libraries/qt-5/5.14/default.nix b/pkgs/development/libraries/qt-5/5.14/default.nix
index 7139a3b735416..7be5079927595 100644
--- a/pkgs/development/libraries/qt-5/5.14/default.nix
+++ b/pkgs/development/libraries/qt-5/5.14/default.nix
@@ -149,7 +149,7 @@ let
         patches = patches.qtbase;
         inherit bison cups harfbuzz libGL;
         withGtk3 = true; inherit dconf gtk3;
-        inherit developerBuild decryptSslTraffic;
+        inherit debug developerBuild decryptSslTraffic;
       };
 
       qtcharts = callPackage ../modules/qtcharts.nix {};
@@ -199,6 +199,7 @@ let
       qmake = makeSetupHook {
         deps = [ self.qtbase.dev ];
         substitutions = {
+          inherit debug;
           fix_qmake_libtool = ../hooks/fix-qmake-libtool.sh;
         };
       } ../hooks/qmake-hook.sh;
diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix
index a3a0496f160f5..c3f6ab159c499 100644
--- a/pkgs/development/libraries/qt-5/5.15/default.nix
+++ b/pkgs/development/libraries/qt-5/5.15/default.nix
@@ -179,6 +179,7 @@ let
       qmake = makeSetupHook {
         deps = [ self.qtbase.dev ];
         substitutions = {
+          inherit debug;
           fix_qmake_libtool = ../hooks/fix-qmake-libtool.sh;
         };
       } ../hooks/qmake-hook.sh;
diff --git a/pkgs/development/libraries/qt-5/hooks/qmake-hook.sh b/pkgs/development/libraries/qt-5/hooks/qmake-hook.sh
index 7f6ddb76ad571..741225a5aa810 100644
--- a/pkgs/development/libraries/qt-5/hooks/qmake-hook.sh
+++ b/pkgs/development/libraries/qt-5/hooks/qmake-hook.sh
@@ -3,6 +3,9 @@
 qmakeFlags=( ${qmakeFlags-} )
 
 qmakePrePhase() {
+    qmakeFlags_orig=( "${qmakeFlags[@]}" )
+
+    # These flags must be added _before_ the flags specified in the derivation.
     qmakeFlags=( \
         "PREFIX=$out" \
         "NIX_OUTPUT_OUT=$out" \
@@ -11,8 +14,15 @@ qmakePrePhase() {
         "NIX_OUTPUT_DOC=${!outputDev}/${qtDocPrefix:?}" \
         "NIX_OUTPUT_QML=${!outputBin}/${qtQmlPrefix:?}" \
         "NIX_OUTPUT_PLUGIN=${!outputBin}/${qtPluginPrefix:?}" \
-        "${qmakeFlags[@]}" \
     )
+
+    if [ -n "@debug@" ]; then
+        qmakeFlags+=( "CONFIG+=debug" )
+    else
+        qmakeFlags+=( "CONFIG+=release" )
+    fi
+
+    qmakeFlags+=( "${qmakeFlags_orig[@]}" )
 }
 prePhases+=" qmakePrePhase"
 
diff --git a/pkgs/development/libraries/qt-5/hooks/qtbase-setup-hook.sh b/pkgs/development/libraries/qt-5/hooks/qtbase-setup-hook.sh
index 9f2a9f06f1aba..1b57d676e1fc5 100644
--- a/pkgs/development/libraries/qt-5/hooks/qtbase-setup-hook.sh
+++ b/pkgs/development/libraries/qt-5/hooks/qtbase-setup-hook.sh
@@ -1,3 +1,14 @@
+if [[ -n "${__nix_qtbase-}" ]]; then
+    # Throw an error if a different version of Qt was already set up.
+    if [[ "$__nix_qtbase" != "@dev@" ]]; then
+        echo >&2 "Error: detected mismatched Qt dependencies:"
+        echo >&2 "    @dev@"
+        echo >&2 "    $__nix_qtbase"
+        exit 1
+    fi
+else # Only set up Qt once.
+__nix_qtbase="@dev@"
+
 qtPluginPrefix=@qtPluginPrefix@
 qtQmlPrefix=@qtQmlPrefix@
 qtDocPrefix=@qtDocPrefix@
@@ -5,6 +16,20 @@ qtDocPrefix=@qtDocPrefix@
 . @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
+
 providesQtRuntime() {
     [ -d "$1/$qtPluginPrefix" ] || [ -d "$1/$qtQmlPrefix" ]
 }
@@ -19,7 +44,12 @@ export QMAKEPATH
 QMAKEMODULES=
 export QMAKEMODULES
 
+declare -Ag qmakePathSeen=()
 qmakePathHook() {
+    # Skip this path if we have seen it before.
+    # MUST use 'if' because 'qmakePathSeen[$]' may be unset.
+    if [ -n "${qmakePathSeen[$1]-}" ]; then return; fi
+    qmakePathSeen[$1]=1
     if [ -d "$1/mkspecs" ]
     then
         QMAKEMODULES="${QMAKEMODULES}${QMAKEMODULES:+:}/mkspecs"
@@ -34,7 +64,12 @@ envBuildHostHooks+=(qmakePathHook)
 # package depending on the building package. (This is necessary in case
 # the building package does not provide runtime dependencies itself and so
 # would not be propagated to the user environment.)
+declare -Ag qtEnvHostTargetSeen=()
 qtEnvHostTargetHook() {
+    # Skip this path if we have seen it before.
+    # MUST use 'if' because 'qmakePathSeen[$]' may be unset.
+    if [ -n "${qtEnvHostTargetSeen[$1]-}" ]; then return; fi
+    qtEnvHostTargetSeen[$1]=1
     if providesQtRuntime "$1" && [ "z${!outputBin}" != "z${!outputDev}" ]
     then
         propagatedBuildInputs+=" $1"
@@ -64,3 +99,14 @@ postPatchMkspecs() {
 if [ -z "${dontPatchMkspecs-}" ]; then
     postPhases="${postPhases-}${postPhases:+ }postPatchMkspecs"
 fi
+
+qtPreHook() {
+    # Check that wrapQtAppsHook is used, or it is explicitly disabled.
+    if [[ -z "$__nix_wrapQtAppsHook" && -z "$dontWrapQtApps" ]]; then
+        echo >&2 "Error: wrapQtAppsHook is not used, and dontWrapQtApps is not set."
+        exit 1
+    fi
+}
+prePhases+=" qtPreHook"
+
+fi
diff --git a/pkgs/development/libraries/qt-5/hooks/wrap-qt-apps-hook.sh b/pkgs/development/libraries/qt-5/hooks/wrap-qt-apps-hook.sh
index 7356c8ee35605..ce4d78fbb50f1 100644
--- a/pkgs/development/libraries/qt-5/hooks/wrap-qt-apps-hook.sh
+++ b/pkgs/development/libraries/qt-5/hooks/wrap-qt-apps-hook.sh
@@ -1,3 +1,6 @@
+if [[ -z "${__nix_wrapQtAppsHook-}" ]]; then
+__nix_wrapQtAppsHook=1  # Don't run this hook more than once.
+
 # Inherit arguments given in mkDerivation
 qtWrapperArgs=( ${qtWrapperArgs-} )
 
@@ -100,3 +103,5 @@ wrapQtAppsHook() {
 }
 
 fixupOutputHooks+=(wrapQtAppsHook)
+
+fi
diff --git a/pkgs/development/libraries/qt-5/mkDerivation.nix b/pkgs/development/libraries/qt-5/mkDerivation.nix
index 2c6333cb02045..98f9a05fac7c4 100644
--- a/pkgs/development/libraries/qt-5/mkDerivation.nix
+++ b/pkgs/development/libraries/qt-5/mkDerivation.nix
@@ -9,21 +9,6 @@ args:
 let
   args_ = {
 
-    qmakeFlags = [ ("CONFIG+=" + (if debug then "debug" else "release")) ]
-              ++ (args.qmakeFlags or []);
-
-    NIX_CFLAGS_COMPILE = toString (
-      optional (!debug) "-DQT_NO_DEBUG"
-      ++ lib.toList (args.NIX_CFLAGS_COMPILE or []));
-
-    cmakeFlags =
-      (args.cmakeFlags or [])
-      ++ [
-        ("-DCMAKE_BUILD_TYPE=" + (if debug then "Debug" else "Release"))
-      ];
-
-    enableParallelBuilding = args.enableParallelBuilding or true;
-
     nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ wrapQtAppsHook ];
 
   };
diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix
index 24f1d6f81a24b..0d0bef342b02c 100644
--- a/pkgs/development/libraries/qt-5/modules/qtbase.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix
@@ -22,6 +22,7 @@
   libGL,
   buildExamples ? false,
   buildTests ? false,
+  debug ? false,
   developerBuild ? false,
   decryptSslTraffic ? false
 }:
@@ -33,12 +34,14 @@ let
   compareVersion = v: builtins.compareVersions version v;
   qmakeCacheName =
     if compareVersion "5.12.4" < 0 then ".qmake.cache" else ".qmake.stash";
+  debugSymbols = debug || developerBuild;
 in
 
 stdenv.mkDerivation {
 
   name = "qtbase-${version}";
   inherit qtCompatVersion src version;
+  debug = debugSymbols;
 
   propagatedBuildInputs =
     [
@@ -241,6 +244,7 @@ stdenv.mkDerivation {
       "-I" "${icu.dev}/include"
       "-pch"
     ]
+    ++ lib.optional debugSymbols "-debug"
     ++ lib.optionals (compareVersion "5.11.0" < 0)
     [
       "-qml-debug"
@@ -397,6 +401,8 @@ stdenv.mkDerivation {
           -e "/^host_bins=/ c host_bins=$dev/bin"
     '';
 
+  dontStrip = debugSymbols;
+
   setupHook = ../hooks/qtbase-setup-hook.sh;
 
   meta = with lib; {
diff --git a/pkgs/development/libraries/qt-5/qtModule.nix b/pkgs/development/libraries/qt-5/qtModule.nix
index 0481f000c6cee..930ed9d67baa1 100644
--- a/pkgs/development/libraries/qt-5/qtModule.nix
+++ b/pkgs/development/libraries/qt-5/qtModule.nix
@@ -34,6 +34,8 @@ mkDerivation (args // {
     fixQtBuiltinPaths . '*.pr?'
   '';
 
+  dontWrapQtApps = args.dontWrapQtApps or true;
+
   postFixup = ''
     if [ -d "''${!outputDev}/lib/pkgconfig" ]; then
         find "''${!outputDev}/lib/pkgconfig" -name '*.pc' | while read pc; do
diff --git a/pkgs/development/libraries/qtinstaller/default.nix b/pkgs/development/libraries/qtinstaller/default.nix
index 91f8537110665..ce69c855ac23f 100644
--- a/pkgs/development/libraries/qtinstaller/default.nix
+++ b/pkgs/development/libraries/qtinstaller/default.nix
@@ -18,6 +18,7 @@ stdenv.mkDerivation rec {
   setOutputFlags = false;
   enableParallelBuilding = true;
   NIX_QT_SUBMODULE = true;
+  dontWrapQtApps = true;
 
   installPhase = ''
     mkdir -p $out/{bin,lib,share/qt-installer-framework}
diff --git a/pkgs/development/libraries/qtkeychain/default.nix b/pkgs/development/libraries/qtkeychain/default.nix
index 6da4abb756e69..3da0587210d80 100644
--- a/pkgs/development/libraries/qtkeychain/default.nix
+++ b/pkgs/development/libraries/qtkeychain/default.nix
@@ -19,6 +19,8 @@ stdenv.mkDerivation rec {
     sha256 = "0h4wgngn2yl35hapbjs24amkjfbzsvnna4ixfhn87snjnq5lmjbc"; # v0.9.1
   };
 
+  dontWrapQtApps = true;
+
   patches = (if withQt5 then [] else [ ./0001-Fixes-build-with-Qt4.patch ]) ++ (if stdenv.isDarwin then [ ./0002-Fix-install-name-Darwin.patch ] else []);
 
   cmakeFlags = [ "-DQT_TRANSLATIONS_DIR=share/qt/translations" ];
diff --git a/pkgs/development/libraries/qtpbfimageplugin/default.nix b/pkgs/development/libraries/qtpbfimageplugin/default.nix
index 3558201015c6b..9dbc2491ad955 100644
--- a/pkgs/development/libraries/qtpbfimageplugin/default.nix
+++ b/pkgs/development/libraries/qtpbfimageplugin/default.nix
@@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ qmake ];
   buildInputs = [ qtbase protobuf ];
 
+  dontWrapQtApps = true;
+
   postPatch = ''
     # Fix plugin dir
     substituteInPlace pbfplugin.pro \
diff --git a/pkgs/development/libraries/qtutilities/default.nix b/pkgs/development/libraries/qtutilities/default.nix
index 831c51fa234dd..f5398d92dfcc7 100644
--- a/pkgs/development/libraries/qtutilities/default.nix
+++ b/pkgs/development/libraries/qtutilities/default.nix
@@ -22,6 +22,8 @@ stdenv.mkDerivation rec {
   buildInputs = [ qtbase cpp-utilities ];
   nativeBuildInputs = [ cmake qttools ];
 
+  dontWrapQtApps = true;
+
   meta = with lib; {
     homepage = "https://github.com/Martchus/qtutilities";
     description = "Common C++ classes and routines used by @Martchus' applications featuring argument parser, IO and conversion utilities";
diff --git a/pkgs/development/libraries/qtwebkit-plugins/default.nix b/pkgs/development/libraries/qtwebkit-plugins/default.nix
index 652c49aa6ca25..5bc30db059e73 100644
--- a/pkgs/development/libraries/qtwebkit-plugins/default.nix
+++ b/pkgs/development/libraries/qtwebkit-plugins/default.nix
@@ -14,6 +14,8 @@ stdenv.mkDerivation {
 
   buildInputs = [ qtwebkit hunspell ];
 
+  dontWrapQtApps = true;
+
   postPatch = ''
     sed -i "s,-lhunspell,-lhunspell-${lib.versions.majorMinor hunspell.version}," src/spellcheck/spellcheck.pri
     sed -i "s,\$\$\[QT_INSTALL_PLUGINS\],$out/$qtPluginPrefix," src/src.pro
diff --git a/pkgs/development/libraries/quazip/default.nix b/pkgs/development/libraries/quazip/default.nix
index 3f186314d0139..a12d6cafe4ae9 100644
--- a/pkgs/development/libraries/quazip/default.nix
+++ b/pkgs/development/libraries/quazip/default.nix
@@ -15,6 +15,8 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake ]
     ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
 
+  dontWrapQtApps = true;
+
   meta = with lib; {
     description = "Provides access to ZIP archives from Qt programs";
     license = licenses.lgpl21Plus;
diff --git a/pkgs/development/libraries/qwt/6.nix b/pkgs/development/libraries/qwt/6.nix
index edfd3b4e24a3b..e5fad490f6ed3 100644
--- a/pkgs/development/libraries/qwt/6.nix
+++ b/pkgs/development/libraries/qwt/6.nix
@@ -17,6 +17,8 @@ stdenv.mkDerivation rec {
 
   qmakeFlags = [ "-after doc.path=$out/share/doc/${name}" ];
 
+  dontWrapQtApps = true;
+
   meta = with lib; {
     description = "Qt widgets for technical applications";
     homepage = "http://qwt.sourceforge.net/";
diff --git a/pkgs/development/libraries/soqt/default.nix b/pkgs/development/libraries/soqt/default.nix
index 2be6c66214546..fe7901bddd582 100644
--- a/pkgs/development/libraries/soqt/default.nix
+++ b/pkgs/development/libraries/soqt/default.nix
@@ -17,6 +17,8 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ cmake pkg-config ];
 
+  dontWrapQtApps = true;
+
   meta = with lib; {
     homepage = "https://github.com/coin3d/soqt";
     license = licenses.bsd3;
diff --git a/pkgs/development/libraries/telepathy/qt/default.nix b/pkgs/development/libraries/telepathy/qt/default.nix
index b606c56445ed7..f61811428ce6f 100644
--- a/pkgs/development/libraries/telepathy/qt/default.nix
+++ b/pkgs/development/libraries/telepathy/qt/default.nix
@@ -20,6 +20,8 @@ in stdenv.mkDerivation rec {
   # On 0.9.7, they do not even build with QT4
   cmakeFlags = lib.optional (!doCheck) "-DENABLE_TESTS=OFF";
 
+  dontWrapQtApps = true;
+
   doCheck = false; # giving up for now
 
   meta = with lib; {
diff --git a/pkgs/development/libraries/vtk/generic.nix b/pkgs/development/libraries/vtk/generic.nix
index 273bff8852ee0..85eaa1ae80e7d 100644
--- a/pkgs/development/libraries/vtk/generic.nix
+++ b/pkgs/development/libraries/vtk/generic.nix
@@ -57,6 +57,8 @@ in stdenv.mkDerivation rec {
     export LD_LIBRARY_PATH="$(pwd)/lib";
   '';
 
+  dontWrapQtApps = true;
+
   # Shared libraries don't work, because of rpath troubles with the current
   # nixpkgs cmake approach. It wants to call a binary at build time, just
   # built and requiring one of the shared objects.
diff --git a/pkgs/development/python-modules/ovito/default.nix b/pkgs/development/python-modules/ovito/default.nix
index a33e5d19b44e6..d0923287183be 100644
--- a/pkgs/development/python-modules/ovito/default.nix
+++ b/pkgs/development/python-modules/ovito/default.nix
@@ -30,6 +30,8 @@ stdenv.mkDerivation rec {
 
   propagatedBuildInputs = with python.pkgs; [ sphinx numpy sip pyqt5 matplotlib ase ];
 
+  dontWrapQtApps = true;
+
   meta = with lib; {
     description = "Scientific visualization and analysis software for atomistic simulation data";
     homepage = "https://www.ovito.org";
diff --git a/pkgs/development/python-modules/pivy/default.nix b/pkgs/development/python-modules/pivy/default.nix
index 312c87ae54443..c51f8cb54e005 100644
--- a/pkgs/development/python-modules/pivy/default.nix
+++ b/pkgs/development/python-modules/pivy/default.nix
@@ -29,8 +29,7 @@ buildPythonPackage rec {
   ];
 
   dontUseQmakeConfigure = true;
-  dontUseCmakeConfigure = true;
-
+  dontWrapQtApps =true;
   doCheck = false;
 
   postPatch = ''
diff --git a/pkgs/development/python-modules/poppler-qt5/default.nix b/pkgs/development/python-modules/poppler-qt5/default.nix
index e94a234dc1a36..345f092a80fa3 100644
--- a/pkgs/development/python-modules/poppler-qt5/default.nix
+++ b/pkgs/development/python-modules/poppler-qt5/default.nix
@@ -34,6 +34,8 @@ buildPythonPackage rec {
   # no tests, just bindings for `poppler_qt5`
   doCheck = false;
 
+  dontWrapQtApps = true;
+
   meta = with lib; {
     homepage = "https://github.com/wbsoft/python-poppler-qt5";
     license = licenses.gpl2;
diff --git a/pkgs/development/python-modules/pyqt/5.x.nix b/pkgs/development/python-modules/pyqt/5.x.nix
index 26bf5dc1c4b86..6e4b4d37f2893 100644
--- a/pkgs/development/python-modules/pyqt/5.x.nix
+++ b/pkgs/development/python-modules/pyqt/5.x.nix
@@ -57,6 +57,8 @@ in buildPythonPackage rec {
 
   outputs = [ "out" "dev" ];
 
+  dontWrapQtApps = true;
+
   nativeBuildInputs = [
     pkg-config
     qmake
diff --git a/pkgs/development/python-modules/pyqtwebengine/default.nix b/pkgs/development/python-modules/pyqtwebengine/default.nix
index 262c5a17504a6..dc631b2118ef1 100644
--- a/pkgs/development/python-modules/pyqtwebengine/default.nix
+++ b/pkgs/development/python-modules/pyqtwebengine/default.nix
@@ -45,6 +45,8 @@ in buildPythonPackage rec {
   propagatedBuildInputs = [ pyqt5 ]
     ++ lib.optional (!isPy3k) enum34;
 
+  dontWrapQtApps = true;
+
   configurePhase = ''
     runHook preConfigure
 
diff --git a/pkgs/development/python-modules/pyside/default.nix b/pkgs/development/python-modules/pyside/default.nix
index 08fd8cbfa862a..f880791eeec04 100644
--- a/pkgs/development/python-modules/pyside/default.nix
+++ b/pkgs/development/python-modules/pyside/default.nix
@@ -23,6 +23,8 @@ buildPythonPackage rec {
 
   makeFlags = [ "QT_PLUGIN_PATH=${pysideShiboken}/lib/generatorrunner" ];
 
+  dontWrapQtApps = true;
+
   meta = {
     description = "LGPL-licensed Python bindings for the Qt cross-platform application and UI framework";
     license = lib.licenses.lgpl21;
diff --git a/pkgs/development/python-modules/pyside2-tools/default.nix b/pkgs/development/python-modules/pyside2-tools/default.nix
index 095a10c1047dc..20f1a572f1b49 100644
--- a/pkgs/development/python-modules/pyside2-tools/default.nix
+++ b/pkgs/development/python-modules/pyside2-tools/default.nix
@@ -25,6 +25,8 @@ stdenv.mkDerivation {
     "-DBUILD_TESTS=OFF"
   ];
 
+  dontWrapQtApps = true;
+
   # The upstream build system consists of a `setup.py` whichs builds three
   # different python libraries and calls cmake as a subprocess.  We call cmake
   # directly because that's easier to get working.  However, the `setup.py`
diff --git a/pkgs/development/python-modules/pyside2/default.nix b/pkgs/development/python-modules/pyside2/default.nix
index 6986c8e5384bf..c2786b647d624 100644
--- a/pkgs/development/python-modules/pyside2/default.nix
+++ b/pkgs/development/python-modules/pyside2/default.nix
@@ -30,6 +30,8 @@ stdenv.mkDerivation rec {
   ];
   propagatedBuildInputs = [ shiboken2 ];
 
+  dontWrapQtApps = true;
+
   meta = with lib; {
     description = "LGPL-licensed Python bindings for Qt";
     license = licenses.lgpl21;
diff --git a/pkgs/development/python-modules/qscintilla-qt5/default.nix b/pkgs/development/python-modules/qscintilla-qt5/default.nix
index 2ee9c82f08db7..dcbe213966f95 100644
--- a/pkgs/development/python-modules/qscintilla-qt5/default.nix
+++ b/pkgs/development/python-modules/qscintilla-qt5/default.nix
@@ -14,6 +14,8 @@ buildPythonPackage {
   buildInputs = [ qscintilla ];
   propagatedBuildInputs = [ pyqt5 ];
 
+  dontWrapQtApps = true;
+
   postPatch = ''
     substituteInPlace Python/configure.py \
       --replace \
diff --git a/pkgs/development/python-modules/roboschool/default.nix b/pkgs/development/python-modules/roboschool/default.nix
index 3e15f18a3dd1e..97eee2155a5e1 100644
--- a/pkgs/development/python-modules/roboschool/default.nix
+++ b/pkgs/development/python-modules/roboschool/default.nix
@@ -44,6 +44,8 @@ buildPythonPackage rec {
     boost
   ];
 
+  dontWrapQtApps = true;
+
   NIX_CFLAGS_COMPILE="-I ${python}/include/${python.libPrefix}";
 
   patches = [
diff --git a/pkgs/development/python-modules/shiboken2/default.nix b/pkgs/development/python-modules/shiboken2/default.nix
index b7508a8f6447f..23836addd0ca9 100644
--- a/pkgs/development/python-modules/shiboken2/default.nix
+++ b/pkgs/development/python-modules/shiboken2/default.nix
@@ -23,6 +23,8 @@ stdenv.mkDerivation {
     "-DBUILD_TESTS=OFF"
   ];
 
+  dontWrapQtApps = true;
+
   postInstall = ''
     rm $out/bin/shiboken_tool.py
   '';
diff --git a/pkgs/development/tools/analysis/panopticon/default.nix b/pkgs/development/tools/analysis/panopticon/default.nix
index 0ef33270e92bf..91f3f24d6f1fe 100644
--- a/pkgs/development/tools/analysis/panopticon/default.nix
+++ b/pkgs/development/tools/analysis/panopticon/default.nix
@@ -23,6 +23,8 @@ rustPlatform.buildRustPackage rec {
      git
   ];
 
+  dontWrapQtApps = true;
+
   cargoSha256 = "1hdsn011y9invfy7can8c02zwa7birj9y1rxhrj7wyv4gh3659i0";
   doCheck = false;
 
diff --git a/pkgs/development/tools/analysis/qcachegrind/default.nix b/pkgs/development/tools/analysis/qcachegrind/default.nix
index 0145e51ee2628..5e321db01aa4b 100644
--- a/pkgs/development/tools/analysis/qcachegrind/default.nix
+++ b/pkgs/development/tools/analysis/qcachegrind/default.nix
@@ -12,6 +12,8 @@ in stdenv.mkDerivation {
 
   nativeBuildInputs = [ qmake ];
 
+  dontWrapQtApps = true;
+
   postInstall = ''
      mkdir -p $out/bin
      cp -p converters/dprof2calltree $out/bin/dprof2calltree
diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix
index 5e5875cc36c47..5de894bd1b420 100644
--- a/pkgs/development/tools/build-managers/cmake/default.nix
+++ b/pkgs/development/tools/build-managers/cmake/default.nix
@@ -14,7 +14,7 @@
 assert withQt5 -> useQt4 == false;
 assert useQt4 -> withQt5 == false;
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (rec {
   pname = "cmake"
           + lib.optionalString isBootstrap "-boot"
           + lib.optionalString useNcurses "-cursesUI"
@@ -130,4 +130,5 @@ stdenv.mkDerivation rec {
     maintainers = with maintainers; [ ttuegel lnl7 ];
     license = licenses.bsd3;
   };
-}
+} // (if withQt5 then { dontWrapQtApps = true; } else {})
+)
diff --git a/pkgs/development/tools/build-managers/qbs/default.nix b/pkgs/development/tools/build-managers/qbs/default.nix
index 3bf7623ed04c5..73c23b88752e2 100644
--- a/pkgs/development/tools/build-managers/qbs/default.nix
+++ b/pkgs/development/tools/build-managers/qbs/default.nix
@@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ qmake ];
 
+  dontWrapQtApps = true;
+
   qmakeFlags = [ "QBS_INSTALL_PREFIX=$(out)" "qbs.pro" ];
 
   buildInputs = [ qtbase qtscript ];
diff --git a/pkgs/development/tools/minizinc/ide.nix b/pkgs/development/tools/minizinc/ide.nix
index 7709423e676f7..fd366cc39a5fd 100644
--- a/pkgs/development/tools/minizinc/ide.nix
+++ b/pkgs/development/tools/minizinc/ide.nix
@@ -19,6 +19,7 @@ stdenv.mkDerivation {
   sourceRoot = "source/MiniZincIDE";
 
   enableParallelBuilding = true;
+  dontWrapQtApps = true;
 
   postInstall = ''
     wrapProgram $out/bin/MiniZincIDE --prefix PATH ":" ${lib.makeBinPath [ minizinc ]}
diff --git a/pkgs/development/tools/misc/kdbg/default.nix b/pkgs/development/tools/misc/kdbg/default.nix
index dad7d41c1f686..35e0a52865fae 100644
--- a/pkgs/development/tools/misc/kdbg/default.nix
+++ b/pkgs/development/tools/misc/kdbg/default.nix
@@ -18,6 +18,8 @@ stdenv.mkDerivation rec {
     wrapProgram $out/bin/kdbg --prefix QT_PLUGIN_PATH : ${qtbase}/${qtbase.qtPluginPrefix}
   '';
 
+  dontWrapQtApps = true;
+
   meta = with lib; {
     homepage = "https://www.kdbg.org/";
     description = ''
diff --git a/pkgs/development/tools/phantomjs2/default.nix b/pkgs/development/tools/phantomjs2/default.nix
index 594deeb1c7305..3d0db49aedcd5 100644
--- a/pkgs/development/tools/phantomjs2/default.nix
+++ b/pkgs/development/tools/phantomjs2/default.nix
@@ -77,6 +77,8 @@ in stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
+  dontWrapQtApps = true;
+
   installPhase = ''
     mkdir -p $out/share/doc/phantomjs
     cp -a bin $out
diff --git a/pkgs/development/tools/rgp/default.nix b/pkgs/development/tools/rgp/default.nix
index 8beeccfa2fd1e..3cfd608e22586 100644
--- a/pkgs/development/tools/rgp/default.nix
+++ b/pkgs/development/tools/rgp/default.nix
@@ -53,6 +53,8 @@ stdenv.mkDerivation rec {
     "${placeholder "out"}/opt/rgp/qt"
   ];
 
+  dontWrapQtApps = true;
+
   installPhase = ''
     mkdir -p $out/opt/rgp $out/bin
     cp -r . $out/opt/rgp/