QT 5.12 introduced a regression, where a QT program wouldn't show its
tray icon, if there was no tray bar during program startup. (QTBUG-73459)
QT 5.12 introduced a regression, where qtwebengine applications would
freeze in some wayland compositors if a surface from the instance was not
visible (for example having a qutebrowser window on another workspace in
sway would freeze all qutebrowser windows).
Both got fixed already in Qt 5.12.4, but according to #57042 and its
sibling issues/PRs it doesn't seem to get fixed in near future for
nixpkgs.
The previous code using substituteInPlace was broken for both 5.9 and
5.11 (latter was broken after a minor release bump). Using patches
should make things fail loudly and prevent modules/qtwebengine.nix from
being littered with version checks.
The patch for 5.12 is only tested to apply.
QtWebEngine's build system is setup to perform certain platform checks
(see mkspecs/features/platform.prf). But a failed check will not cause
configuration phase to fail, but instead it configures no build targets.
So in such case the build will successfully perform build and install
phases. An empty output directories will are produced and the build
succeeds.
This patches qtwebengine qmake files to properly fail during
configuration phase.
This doesn't touch qt56 as it doesn't have this mechanism.