From 02924cf9514f1bb4cf8d82f80fba64c830afe54d Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sun, 10 Jan 2021 11:34:34 -0600 Subject: nixpkgs/manual: update Qt documentation --- doc/languages-frameworks/qt.section.md | 104 ++++++++++++++++++--------------- 1 file changed, 56 insertions(+), 48 deletions(-) (limited to 'doc') diff --git a/doc/languages-frameworks/qt.section.md b/doc/languages-frameworks/qt.section.md index 5dd415852c100..a35dbc56c1c14 100644 --- a/doc/languages-frameworks/qt.section.md +++ b/doc/languages-frameworks/qt.section.md @@ -1,77 +1,78 @@ # Qt {#sec-language-qt} -This section describes the differences between Nix expressions for Qt libraries and applications and Nix expressions for other C++ software. Some knowledge of the latter is assumed. +Writing Nix expressions for Qt libraries and applications is largely similar as for other C++ software. +This section assumes some knowledge of the latter. +There are two problems that the Nixpkgs Qt infrastructure addresses, +which are not shared by other C++ software: -There are primarily two problems which the Qt infrastructure is designed to address: ensuring consistent versioning of all dependencies and finding dependencies at runtime. +1. There are usually multiple supported versions of Qt in Nixpkgs. + All of a package's dependencies must be built with the same version of Qt. + This is similar to the version constraints imposed on interpreted languages like Python. +2. Qt makes extensive use of runtime dependency detection. + Runtime dependencies are made into build dependencies through wrappers. ## Nix expression for a Qt package (default.nix) {#qt-default-nix} ```{=docbook} -{ mkDerivation, qtbase }: +{ stdenv, lib, qtbase }: -mkDerivation { +stdenv.mkDerivation { pname = "myapp"; version = "1.0"; - buildInputs = [ qtbase ]; + buildInputs = [ qtbase ]; } - Import mkDerivation and Qt (such as qtbase modules directly. Do not import Qt package sets; the Qt versions of dependencies may not be coherent, causing build and runtime failures. - - - - - Use mkDerivation instead of stdenv.mkDerivation. mkDerivation is a wrapper around stdenv.mkDerivation which applies some Qt-specific settings. This deriver accepts the same arguments as stdenv.mkDerivation; refer to for details. - - - To use another deriver instead of stdenv.mkDerivation, use mkDerivationWith: - -mkDerivationWith myDeriver { - # ... -} - - If you cannot use mkDerivationWith, please refer to . - - - - - mkDerivation accepts the same arguments as stdenv.mkDerivation, such as buildInputs. + Import Qt modules directly, that is: qtbase, qtdeclarative, etc. + Do not import Qt package sets such as qt5 + because the Qt versions of dependencies may not be coherent, causing build and runtime failures. ``` ## Locating runtime dependencies {#qt-runtime-dependencies} -Qt applications need to be wrapped to find runtime dependencies. If you cannot use `mkDerivation` or `mkDerivationWith` above, include `wrapQtAppsHook` in `nativeBuildInputs`: + +Qt applications must be wrapped to find runtime dependencies. +Include `wrapQtAppsHook` in `nativeBuildInputs`: ```nix +{ stdenv, wrapQtAppsHook }: + stdenv.mkDerivation { # ... - nativeBuildInputs = [ wrapQtAppsHook ]; } ``` -Entries added to `qtWrapperArgs` are used to modify the wrappers created by `wrapQtAppsHook`. The entries are passed as arguments to [wrapProgram executable makeWrapperArgs](#fun-wrapProgram). + +Add entries to `qtWrapperArgs` are to modify the wrappers created by `wrapQtAppsHook`: ```nix -mkDerivation { - # ... +{ stdenv, wrapQtAppsHook }: +stdenv.mkDerivation { + # ... + nativeBuildInputs = [ wrapQtAppsHook ]; qtWrapperArgs = [ ''--prefix PATH : /path/to/bin'' ]; } ``` -Set `dontWrapQtApps` to stop applications from being wrapped automatically. It is required to wrap applications manually with `wrapQtApp`, using the syntax of [wrapProgram executable makeWrapperArgs](#fun-wrapProgram): +The entries are passed as arguments to [wrapProgram](#fun-wrapProgram). + +Set `dontWrapQtApps` to stop applications from being wrapped automatically. +Wrap programs manually with `wrapQtApp`, using the syntax of [wrapProgram](#fun-wrapProgram): ```nix -mkDerivation { - # ... +{ stdenv, lib, wrapQtAppsHook }: +stdenv.mkDerivation { + # ... + nativeBuildInputs = [ wrapQtAppsHook ]; dontWrapQtApps = true; preFixup = '' wrapQtApp "$out/bin/myapp" --prefix PATH : /path/to/bin @@ -79,21 +80,14 @@ mkDerivation { } ``` -> Note: `wrapQtAppsHook` ignores files that are non-ELF executables. This means that scripts won't be automatically wrapped so you'll need to manually wrap them as previously mentioned. An example of when you'd always need to do this is with Python applications that use PyQT. - -Libraries are built with every available version of Qt. Use the `meta.broken` attribute to disable the package for unsupported Qt versions: +> Note: `wrapQtAppsHook` ignores files that are non-ELF executables. +> This means that scripts won't be automatically wrapped so you'll need to manually wrap them as previously mentioned. +> An example of when you'd always need to do this is with Python applications that use PyQT. -```nix -mkDerivation { - # ... - - # Disable this library with Qt < 5.9.0 - meta.broken = builtins.compareVersions qtbase.version "5.9.0" < 0; -} -``` ## Adding a library to Nixpkgs -Qt libraries are added to `qt5-packages.nix` and are made available for every Qt -version supported. +Add Qt libraries to `qt5-packages.nix` to make them available for every +supported Qt version. + ### Example adding a Qt library {#qt-library-all-packages-nix} The following represents the contents of `qt5-packages.nix`. @@ -106,9 +100,23 @@ The following represents the contents of `qt5-packages.nix`. # ... } ``` + +Libraries are built with every available version of Qt. +Use the `meta.broken` attribute to disable the package for unsupported Qt versions: + +```nix +{ stdenv, lib, qtbase }: + +stdenv.mkDerivation { + # ... + # Disable this library with Qt < 5.9.0 + meta.broken = lib.versionOlder qtbase.version "5.9.0"; +} +``` + ## Adding an application to Nixpkgs -Applications that use Qt are also added to `qt5-packages.nix`. An alias is added -in the top-level `all-packages.nix` pointing to the package with the desired Qt5 version. +Add Qt applications to `qt5-packages.nix`. Add an alias to `all-packages.nix` +to select the Qt 5 version used for the application. ### Example adding a Qt application {#qt-application-all-packages-nix} -- cgit 1.4.1 From e605824a9215f41c20e97c84ce3cf68dc3e589e5 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Mon, 11 Jan 2021 12:09:48 -0600 Subject: qt.section.md: use new syntax for admonitions --- doc/languages-frameworks/qt.section.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/languages-frameworks/qt.section.md b/doc/languages-frameworks/qt.section.md index a35dbc56c1c14..966af3b2925fc 100644 --- a/doc/languages-frameworks/qt.section.md +++ b/doc/languages-frameworks/qt.section.md @@ -80,9 +80,11 @@ stdenv.mkDerivation { } ``` -> Note: `wrapQtAppsHook` ignores files that are non-ELF executables. -> This means that scripts won't be automatically wrapped so you'll need to manually wrap them as previously mentioned. -> An example of when you'd always need to do this is with Python applications that use PyQT. +::: note +`wrapQtAppsHook` ignores files that are non-ELF executables. +This means that scripts won't be automatically wrapped so you'll need to manually wrap them as previously mentioned. +An example of when you'd always need to do this is with Python applications that use PyQt. +::: ## Adding a library to Nixpkgs Add Qt libraries to `qt5-packages.nix` to make them available for every -- cgit 1.4.1 From 5590e365e4775f138610b1036a75f8886921843e Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Tue, 12 Jan 2021 05:50:23 -0600 Subject: qtbase: Check for wrapQtAppsHook in setupHook --- doc/languages-frameworks/qt.section.md | 16 +++++++++++++--- pkgs/applications/audio/csound/csound-qt/default.nix | 2 ++ pkgs/applications/audio/keyfinder/default.nix | 2 ++ pkgs/applications/audio/kmetronome/default.nix | 2 ++ pkgs/applications/audio/nootka/default.nix | 2 ++ pkgs/applications/audio/nootka/unstable.nix | 2 ++ pkgs/applications/audio/ocenaudio/default.nix | 1 + pkgs/applications/audio/playbar2/default.nix | 2 ++ pkgs/applications/audio/seq66/default.nix | 2 ++ pkgs/applications/audio/spectmorph/default.nix | 2 ++ pkgs/applications/blockchains/bitcoin-classic.nix | 2 ++ pkgs/applications/display-managers/lightdm/default.nix | 2 ++ pkgs/applications/editors/code-browser/default.nix | 3 +++ pkgs/applications/editors/kdevelop5/kdev-php.nix | 2 ++ pkgs/applications/editors/kdevelop5/kdev-python.nix | 2 ++ pkgs/applications/editors/kdevelop5/kdevelop-pg-qt.nix | 2 ++ pkgs/applications/editors/qxmledit/default.nix | 2 ++ pkgs/applications/misc/gpsbabel/default.nix | 2 ++ pkgs/applications/misc/gpsbabel/gui.nix | 2 ++ .../misc/plasma-applet-volumewin7mixer/default.nix | 2 ++ pkgs/applications/misc/redis-desktop-manager/default.nix | 1 + .../applications/misc/redshift-plasma-applet/default.nix | 2 ++ pkgs/applications/misc/subsurface/default.nix | 2 ++ pkgs/applications/networking/irc/communi/default.nix | 2 ++ pkgs/applications/office/cb2bib/default.nix | 2 ++ pkgs/applications/radio/gnuradio/default.nix | 2 ++ pkgs/applications/radio/gnuradio/shared.nix | 1 + pkgs/applications/radio/unixcw/default.nix | 2 ++ pkgs/applications/science/logic/mcrl2/default.nix | 2 ++ .../applications/version-management/bcompare/default.nix | 1 + .../git-and-tools/svn-all-fast-export/default.nix | 2 ++ pkgs/applications/video/obs-studio/obs-ndi.nix | 2 ++ pkgs/applications/video/obs-studio/v4l2sink.nix | 2 ++ pkgs/applications/video/openshot-qt/libopenshot.nix | 2 ++ pkgs/data/icons/maia-icon-theme/default.nix | 2 ++ pkgs/development/interpreters/supercollider/default.nix | 2 ++ pkgs/development/libraries/aqbanking/gwenhywfar.nix | 2 ++ pkgs/development/libraries/audio/suil/default.nix | 2 ++ pkgs/development/libraries/dxflib/default.nix | 1 + pkgs/development/libraries/g2o/default.nix | 2 ++ pkgs/development/libraries/gecode/default.nix | 1 + pkgs/development/libraries/gpgme/default.nix | 2 ++ pkgs/development/libraries/kpmcore/default.nix | 2 ++ pkgs/development/libraries/libcommuni/default.nix | 2 ++ pkgs/development/libraries/libdbusmenu-qt/default.nix | 2 ++ pkgs/development/libraries/libdbusmenu-qt/qt-5.5.nix | 2 ++ pkgs/development/libraries/libkeyfinder/default.nix | 2 ++ pkgs/development/libraries/libktorrent/default.nix | 2 ++ pkgs/development/libraries/liblastfm/default.nix | 2 ++ pkgs/development/libraries/libqglviewer/default.nix | 2 ++ pkgs/development/libraries/opencsg/default.nix | 2 ++ pkgs/development/libraries/phonon/backends/gstreamer.nix | 2 ++ pkgs/development/libraries/phonon/backends/vlc.nix | 2 ++ pkgs/development/libraries/phonon/default.nix | 2 ++ pkgs/development/libraries/polkit-qt-1/qt-5.nix | 2 ++ pkgs/development/libraries/poppler/0.61.nix | 2 ++ pkgs/development/libraries/poppler/default.nix | 2 ++ pkgs/development/libraries/pyotherside/default.nix | 2 ++ pkgs/development/libraries/python-qt/default.nix | 2 ++ pkgs/development/libraries/qca-qt5/default.nix | 2 ++ pkgs/development/libraries/qmlbox2d/default.nix | 1 + pkgs/development/libraries/qmltermwidget/default.nix | 2 ++ pkgs/development/libraries/qoauth/default.nix | 2 ++ pkgs/development/libraries/qscintilla/default.nix | 1 + .../libraries/qt-5/hooks/qtbase-setup-hook.sh | 9 +++++++++ pkgs/development/libraries/qt-5/qtModule.nix | 2 ++ pkgs/development/libraries/qtinstaller/default.nix | 1 + pkgs/development/libraries/qtkeychain/default.nix | 2 ++ pkgs/development/libraries/qtpbfimageplugin/default.nix | 2 ++ pkgs/development/libraries/qtutilities/default.nix | 2 ++ pkgs/development/libraries/qtwebkit-plugins/default.nix | 2 ++ pkgs/development/libraries/quazip/default.nix | 2 ++ pkgs/development/libraries/qwt/6.nix | 2 ++ pkgs/development/libraries/soqt/default.nix | 2 ++ pkgs/development/libraries/telepathy/qt/default.nix | 2 ++ pkgs/development/libraries/vtk/generic.nix | 2 ++ pkgs/development/python-modules/ovito/default.nix | 2 ++ pkgs/development/python-modules/pivy/default.nix | 3 +-- pkgs/development/python-modules/poppler-qt5/default.nix | 2 ++ pkgs/development/python-modules/pyqt/5.x.nix | 2 ++ .../development/python-modules/pyqtwebengine/default.nix | 2 ++ pkgs/development/python-modules/pyside/default.nix | 2 ++ .../development/python-modules/pyside2-tools/default.nix | 2 ++ pkgs/development/python-modules/pyside2/default.nix | 2 ++ .../python-modules/qscintilla-qt5/default.nix | 2 ++ pkgs/development/python-modules/roboschool/default.nix | 2 ++ pkgs/development/python-modules/shiboken2/default.nix | 2 ++ pkgs/development/tools/analysis/panopticon/default.nix | 2 ++ pkgs/development/tools/analysis/qcachegrind/default.nix | 2 ++ pkgs/development/tools/build-managers/cmake/default.nix | 5 +++-- pkgs/development/tools/build-managers/qbs/default.nix | 2 ++ pkgs/development/tools/minizinc/ide.nix | 1 + pkgs/development/tools/misc/kdbg/default.nix | 2 ++ pkgs/development/tools/phantomjs2/default.nix | 2 ++ pkgs/development/tools/rgp/default.nix | 2 ++ pkgs/games/dwarf-fortress/dwarf-therapist/default.nix | 2 ++ pkgs/games/freeciv/default.nix | 2 ++ pkgs/games/leela-zero/default.nix | 2 ++ pkgs/games/openmw/default.nix | 2 ++ pkgs/games/openmw/tes3mp.nix | 2 ++ pkgs/misc/emulators/citra/default.nix | 2 ++ pkgs/os-specific/linux/akvcam/default.nix | 1 + pkgs/servers/web-apps/virtlyst/default.nix | 2 ++ .../fcitx-engines/fcitx-libpinyin/default.nix | 2 ++ pkgs/tools/inputmethods/hime/default.nix | 2 +- pkgs/tools/misc/ttfautohint/default.nix | 2 ++ pkgs/tools/networking/spoofer/default.nix | 2 ++ pkgs/tools/package-management/packagekit/qt.nix | 2 ++ pkgs/tools/security/proxmark3/default.nix | 2 ++ 109 files changed, 225 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/doc/languages-frameworks/qt.section.md b/doc/languages-frameworks/qt.section.md index 966af3b2925fc..b8b438e88584e 100644 --- a/doc/languages-frameworks/qt.section.md +++ b/doc/languages-frameworks/qt.section.md @@ -15,13 +15,14 @@ which are not shared by other C++ software: ```{=docbook} -{ stdenv, lib, qtbase }: +{ stdenv, lib, qtbase, wrapQtAppsHook }: stdenv.mkDerivation { pname = "myapp"; version = "1.0"; buildInputs = [ qtbase ]; + nativeBuildInputs = [ wrapQtAppsHook ]; } @@ -33,6 +34,13 @@ stdenv.mkDerivation { because the Qt versions of dependencies may not be coherent, causing build and runtime failures. + &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/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 aae90d2f8b496..676901855630f 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 4aaaea406774b..aae07a13399f2 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 338b8f44e03d3..b0ccef3156cb8 100644 --- a/pkgs/development/python-modules/pyqt/5.x.nix +++ b/pkgs/development/python-modules/pyqt/5.x.nix @@ -40,6 +40,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 ff5014bd46a9e..c792986175b46 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/ diff --git a/pkgs/games/dwarf-fortress/dwarf-therapist/default.nix b/pkgs/games/dwarf-fortress/dwarf-therapist/default.nix index 83e181c85e654..bd8825582c43a 100644 --- a/pkgs/games/dwarf-fortress/dwarf-therapist/default.nix +++ b/pkgs/games/dwarf-fortress/dwarf-therapist/default.nix @@ -20,6 +20,8 @@ stdenv.mkDerivation rec { cp -r DwarfTherapist.app $out/Applications '' else null; + dontWrapQtApps = true; + meta = with lib; { description = "Tool to manage dwarves in a running game of Dwarf Fortress"; maintainers = with maintainers; [ abbradar bendlas numinit jonringer ]; diff --git a/pkgs/games/freeciv/default.nix b/pkgs/games/freeciv/default.nix index de5f2751fd191..7ccbd79e74bd9 100644 --- a/pkgs/games/freeciv/default.nix +++ b/pkgs/games/freeciv/default.nix @@ -37,6 +37,8 @@ in stdenv.mkDerivation rec { ++ optional server readline ++ optional enableSqlite sqlite; + dontWrapQtApps = true; + configureFlags = [ "--enable-shared" ] ++ optional sdlClient "--enable-client=sdl" ++ optionals qtClient [ diff --git a/pkgs/games/leela-zero/default.nix b/pkgs/games/leela-zero/default.nix index 4a71fc25c0f24..13b423832e679 100644 --- a/pkgs/games/leela-zero/default.nix +++ b/pkgs/games/leela-zero/default.nix @@ -17,6 +17,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; + dontWrapQtApps = true; + meta = with lib; { description = "Go engine modeled after AlphaGo Zero"; homepage = "https://github.com/gcp/leela-zero"; diff --git a/pkgs/games/openmw/default.nix b/pkgs/games/openmw/default.nix index 23572998d034a..cc1893a9ed390 100644 --- a/pkgs/games/openmw/default.nix +++ b/pkgs/games/openmw/default.nix @@ -30,6 +30,8 @@ stdenv.mkDerivation rec { "-DDESIRED_QT_VERSION:INT=5" ]; + dontWrapQtApps = true; + meta = with lib; { description = "An unofficial open source engine reimplementation of the game Morrowind"; homepage = "http://openmw.org"; diff --git a/pkgs/games/openmw/tes3mp.nix b/pkgs/games/openmw/tes3mp.nix index 47b383a82bd9d..95659e5a088e1 100644 --- a/pkgs/games/openmw/tes3mp.nix +++ b/pkgs/games/openmw/tes3mp.nix @@ -61,6 +61,8 @@ in openmw.overrideAttrs (oldAttrs: rec { "-DRakNet_LIBRARY_DEBUG=${rakNetLibrary}/lib/libRakNetLibStatic.a" ]; + dontWrapQtApps = true; + # https://github.com/TES3MP/openmw-tes3mp/issues/552 patches = [ ./tes3mp.patch diff --git a/pkgs/misc/emulators/citra/default.nix b/pkgs/misc/emulators/citra/default.nix index d092a87868389..aeaf5baa3bf12 100644 --- a/pkgs/misc/emulators/citra/default.nix +++ b/pkgs/misc/emulators/citra/default.nix @@ -14,6 +14,8 @@ mkDerivation { nativeBuildInputs = [ cmake ]; buildInputs = [ SDL2 qtbase qtmultimedia boost ]; + dontWrapQtApps = true; + preConfigure = '' # Trick configure system. sed -n 's,^ *path = \(.*\),\1,p' .gitmodules | while read path; do diff --git a/pkgs/os-specific/linux/akvcam/default.nix b/pkgs/os-specific/linux/akvcam/default.nix index 9e7450775147e..026ef5b0f468c 100644 --- a/pkgs/os-specific/linux/akvcam/default.nix +++ b/pkgs/os-specific/linux/akvcam/default.nix @@ -12,6 +12,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ qmake ]; + dontWrapQtApps = true; qmakeFlags = [ "KERNEL_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" diff --git a/pkgs/servers/web-apps/virtlyst/default.nix b/pkgs/servers/web-apps/virtlyst/default.nix index 05741e0ac21af..3ff42050eb2d0 100644 --- a/pkgs/servers/web-apps/virtlyst/default.nix +++ b/pkgs/servers/web-apps/virtlyst/default.nix @@ -15,6 +15,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config autoPatchelfHook ]; buildInputs = [ qtbase libvirt cutelyst grantlee ]; + dontWrapQtApps = true; + installPhase = '' mkdir -p $out/lib cp src/libVirtlyst.so $out/lib diff --git a/pkgs/tools/inputmethods/fcitx-engines/fcitx-libpinyin/default.nix b/pkgs/tools/inputmethods/fcitx-engines/fcitx-libpinyin/default.nix index 2af4061ae0463..2767b4c7c0ef5 100644 --- a/pkgs/tools/inputmethods/fcitx-engines/fcitx-libpinyin/default.nix +++ b/pkgs/tools/inputmethods/fcitx-engines/fcitx-libpinyin/default.nix @@ -42,6 +42,8 @@ stdenv.mkDerivation rec { cp -rv ${store_path} $NIX_BUILD_TOP/$name/data/${ZHUYIN_DATA_FILE_NAME} ''; + dontWrapQtApps = true; + meta = with lib; { isFcitxEngine = true; description = "Fcitx Wrapper for libpinyin, Library to deal with pinyin"; diff --git a/pkgs/tools/inputmethods/hime/default.nix b/pkgs/tools/inputmethods/hime/default.nix index 8ec6146a02095..988f8941d14b1 100644 --- a/pkgs/tools/inputmethods/hime/default.nix +++ b/pkgs/tools/inputmethods/hime/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation { preConfigure = "patchShebangs configure"; configureFlags = [ "--disable-lib64" "--disable-qt5-immodule" ]; - + dontWrapQtApps = true; meta = with lib; { homepage = "http://hime-ime.github.io/"; diff --git a/pkgs/tools/misc/ttfautohint/default.nix b/pkgs/tools/misc/ttfautohint/default.nix index 9e88e5da4f873..fe121c2d51cef 100644 --- a/pkgs/tools/misc/ttfautohint/default.nix +++ b/pkgs/tools/misc/ttfautohint/default.nix @@ -25,6 +25,8 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + dontWrapQtApps = true; + meta = with lib; { description = "An automatic hinter for TrueType fonts"; longDescription = '' diff --git a/pkgs/tools/networking/spoofer/default.nix b/pkgs/tools/networking/spoofer/default.nix index 23b3f2688c9a9..a983ef9c42c88 100644 --- a/pkgs/tools/networking/spoofer/default.nix +++ b/pkgs/tools/networking/spoofer/default.nix @@ -17,6 +17,8 @@ stdenv.mkDerivation rec { buildInputs = [ openssl protobuf libpcap traceroute ] ++ optional withGUI qt5.qtbase ; + dontWrapQtApps = true; + meta = with lib; { homepage = "https://www.caida.org/projects/spoofer"; description = "Assess and report on deployment of source address validation"; diff --git a/pkgs/tools/package-management/packagekit/qt.nix b/pkgs/tools/package-management/packagekit/qt.nix index f87ce8258fa00..d1d135c157951 100644 --- a/pkgs/tools/package-management/packagekit/qt.nix +++ b/pkgs/tools/package-management/packagekit/qt.nix @@ -16,6 +16,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config qttools ]; + dontWrapQtApps = true; + meta = packagekit.meta // { description = "System to facilitate installing and updating packages - Qt"; }; diff --git a/pkgs/tools/security/proxmark3/default.nix b/pkgs/tools/security/proxmark3/default.nix index 3b1f21ac71873..b52e7279fa98e 100644 --- a/pkgs/tools/security/proxmark3/default.nix +++ b/pkgs/tools/security/proxmark3/default.nix @@ -15,6 +15,8 @@ let nativeBuildInputs = [ pkg-config gcc-arm-embedded ]; buildInputs = [ ncurses readline pcsclite qt5.qtbase ]; + dontWrapQtApps = true; + postPatch = '' substituteInPlace client/Makefile --replace '-ltermcap' ' ' substituteInPlace liblua/Makefile --replace '-ltermcap' ' ' -- cgit 1.4.1