qt: editing pass on docs

This commit is contained in:
K900 2024-11-07 10:52:43 +03:00 committed by Artturin
parent 98774a34c8
commit c8aec3b28a
2 changed files with 6 additions and 3 deletions

View File

@ -29,9 +29,9 @@ Any Qt package should include `wrapQtAppsHook` or `wrapQtAppsNoGuiHook` in `nati
::: {.note}
`wrapQtAppsHook` propagates plugins and QML components from `qtwayland` to ensure the Wayland platform plugin is available, which is required for graphical applications to run under Wayland on non-Qt based desktops. On platforms that do not support `qtwayland` (e.g. Darwin), only plugins `qtbase` will be propagated.
`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` reduce closure size for purely command-line applications.
`wrapQtAppsNoGuiHook` does not propagate `qtwayland` to reduce closure size for purely command-line applications.
:::

View File

@ -77,7 +77,10 @@ else # Only set up Qt once.
qtPreHook() {
# Check that wrapQtAppsHook/wrapQtAppsNoGuiHook is used, or it is explicitly disabled.
if [[ -z "$__nix_wrapQtAppsHook" && -z "$dontWrapQtApps" ]]; then
echo >&2 "Error: neither wrapQtAppsHook nor wrapQtAppsNoGuiHook are used, and dontWrapQtApps is not set either."
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 a library or you need custom wrapping logic, set dontWrapQtApps = true"
exit 1
fi
}