Specify a deployment target of 10.13 to avoid errors due to clang’s
having a hard-coded check for 10.13 when using them (even though it
implements them with `posix_memalign`, which is available on earlier
versions of macOS).
QtWebEngine tries to build with clang 14, which links libc++ 14, but the
top-level libc++ on Dariwn is libc++ 16. This results in a crash during
the build, which is fixed by building with the default stdenv.
A few qt6 modules require python. We need to override with the
appropriate python version in order to use qt6 with non-default python
packages (like python311).
The qmlimportscanner tool is provided by qtdeclarative. Because of the
modularized installation in Nix, it can not be found via the usual
mechanisms. Also, hard-coding it like we do for Qt5 would also not
work, as it would require making qtbase depend on qtdeclarative.
Here we add an option to provide its location via the environment.
While this means macdeployqt does not work out of the box, it provides
a workaround for users.
Also, we make sure that qmlimportscanner gets passed the right QML
import paths as described in the environment.
Apart from the previous ones, two new patches are added. One for
reducing the runtime closure size by removing reference to cmake, the
other for fixing the linker flags in generated qmake files.
The "multiple-outputs.sh" setup hook moves "include", "lib/cmake" and
other folders into the "dev" output if it exists, thus breaking the
invariants expected by the qt build system and we used to patch cmake to
fixup the generated cmake files. In a series of changes to rework qt
packaging, we are now setting "moveToDev" to false to suppress that
behavior, and the cmake patch is no longer required.
QT apps tend to call makeWrapper with a lot of arguments, which causes
noticable slowdowns (+100ms for app startup). The slow down boils down
to two reasons:
- the required string processing is O(N^2)
- bash is slow at doing the processing
By using the binary wrapper, we fix the second point, brining the
overhead down from 100ms to just 4ms or thereabouts.
I tested this change by rebuilding my whole system with it (I use
plasma). It booted and it works (that's where I type this commit
message), but I am not 100% sure if this won't break anything else.
Closes: #225871