diff --git a/doc/languages-frameworks/qt.section.md b/doc/languages-frameworks/qt.section.md index dbd08fb58718..bd1652d9effb 100644 --- a/doc/languages-frameworks/qt.section.md +++ b/doc/languages-frameworks/qt.section.md @@ -25,15 +25,7 @@ stdenv.mkDerivation { The same goes for Qt 5 where libraries and tools are under `libsForQt5`. -Any Qt package should include `wrapQtAppsHook` or `wrapQtAppsNoGuiHook` in `nativeBuildInputs`, or explicitly set `dontWrapQtApps` to bypass generating the wrappers. - -::: {.note} - -`wrapQtAppsHook` propagates plugins and QML components from `qtwayland` on platforms that support it, to allow applications to act as native Wayland clients. It should be used for all graphical applications. - -`wrapQtAppsNoGuiHook` does not propagate `qtwayland` to reduce closure size for purely command-line applications. - -::: +Any Qt package should include `wrapQtAppsHook` in `nativeBuildInputs`, or explicitly set `dontWrapQtApps` to bypass generating the wrappers. ## Packages supporting multiple Qt versions {#qt-versions} diff --git a/pkgs/by-name/dr/drawpile/package.nix b/pkgs/by-name/dr/drawpile/package.nix index 5863b9f75087..a874cd9e26af 100644 --- a/pkgs/by-name/dr/drawpile/package.nix +++ b/pkgs/by-name/dr/drawpile/package.nix @@ -83,12 +83,7 @@ stdenv.mkDerivation rec { extra-cmake-modules rustc rustPlatform.cargoSetupHook - ( - if buildClient || buildServerGui then - qt6Packages.wrapQtAppsHook - else - qt6Packages.wrapQtAppsNoGuiHook - ) + qt6Packages.wrapQtAppsHook ]; buildInputs = [ diff --git a/pkgs/by-name/li/libarchive-qt/package.nix b/pkgs/by-name/li/libarchive-qt/package.nix index 0286a374fba3..03b024ecb8f3 100644 --- a/pkgs/by-name/li/libarchive-qt/package.nix +++ b/pkgs/by-name/li/libarchive-qt/package.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: { meson ninja pkg-config - qt6.wrapQtAppsNoGuiHook + qt6.wrapQtAppsHook ]; buildInputs = [ diff --git a/pkgs/by-name/li/linyaps/package.nix b/pkgs/by-name/li/linyaps/package.nix index 0feed2bdd45e..d1d4301520e4 100644 --- a/pkgs/by-name/li/linyaps/package.nix +++ b/pkgs/by-name/li/linyaps/package.nix @@ -89,7 +89,7 @@ stdenv.mkDerivation (finalAttrs: { cmake copyDesktopItems pkg-config - qt6Packages.wrapQtAppsNoGuiHook + qt6Packages.wrapQtAppsHook ]; postInstall = '' diff --git a/pkgs/by-name/qx/qxmpp/package.nix b/pkgs/by-name/qx/qxmpp/package.nix index a35ced9b5764..58b66c77ffd7 100644 --- a/pkgs/by-name/qx/qxmpp/package.nix +++ b/pkgs/by-name/qx/qxmpp/package.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake - kdePackages.wrapQtAppsNoGuiHook + kdePackages.wrapQtAppsHook ] ++ lib.optionals (withGstreamer || withOmemo) [ pkg-config diff --git a/pkgs/development/libraries/qt-6/default.nix b/pkgs/development/libraries/qt-6/default.nix index 2236001ad901..69381ff13e23 100644 --- a/pkgs/development/libraries/qt-6/default.nix +++ b/pkgs/development/libraries/qt-6/default.nix @@ -131,20 +131,6 @@ let makeSetupHook { name = "wrap-qt6-apps-hook"; propagatedBuildInputs = [ makeBinaryWrapper ]; - depsTargetTargetPropagated = [ - (onlyPluginsAndQml qtbase) - ] - ++ lib.optionals (lib.meta.availableOn stdenv.targetPlatform qtwayland) [ - (onlyPluginsAndQml qtwayland) - ]; - } ./hooks/wrap-qt-apps-hook.sh - ) { }; - - wrapQtAppsNoGuiHook = callPackage ( - { makeBinaryWrapper, qtbase }: - makeSetupHook { - name = "wrap-qt6-apps-no-gui-hook"; - propagatedBuildInputs = [ makeBinaryWrapper ]; depsTargetTargetPropagated = [ (onlyPluginsAndQml qtbase) ]; @@ -164,6 +150,7 @@ let } // lib.optionalAttrs config.allowAliases { full = throw "qt6.full has been removed. Please use individual packages instead."; # Added 2025-10-21 + wrapQtAppsNoGuiHook = lib.warn "wrapQtAppsNoGuiHook is deprecated, use wrapQtAppsHook instead" self.wrapQtAppsHook; }; baseScope = makeScopeWithSplicing' { 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 44e48db7dad8..c70bf22759de 100644 --- a/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh +++ b/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh @@ -77,11 +77,10 @@ else # Only set up Qt once. fi qtPreHook() { - # Check that wrapQtAppsHook/wrapQtAppsNoGuiHook is used, or it is explicitly disabled. + # Check that wrapQtAppsHook is used, or it is explicitly disabled. if [[ -z "$__nix_wrapQtAppsHook" && -z "$dontWrapQtApps" ]]; then echo >&2 "Error: this derivation depends on qtbase, but no wrapping behavior was specified." - echo >&2 " - If this is a graphical application, add wrapQtAppsHook to nativeBuildInputs" - echo >&2 " - If this is a CLI application, add wrapQtAppsNoGuiHook to nativeBuildInputs" + echo >&2 " - If this is an application, add wrapQtAppsHook to nativeBuildInputs" echo >&2 " - If this is a library or you need custom wrapping logic, set dontWrapQtApps = true" exit 1 fi