This commit was too aggressive in adding configure flags. Only qtbsea
needs the -no-framework flag to work correctly. Qmake will handle
everything else for us.
We prefer to have $out/include & $out/lib installed so that things
like multiple outputs can work. There is no way to do this in Qt
currently without also disabling the ‘framework’ install. Not sure if
this will break anything but it will fix issues we run into on some
projects like python2.7-pyside:
Linux: https://hydra.nixos.org/build/73219181
macOS: https://hydra.nixos.org/build/73059550
Hopefully this gives us consistency between the two.
Fixes#39334
and Fixes#36729
Also, Fixes#36932 (hopefully it's still building)
(This might be able to be able to be cherry-picked to 18.03 but be
careful - chromium is extremely touchy. Probably best to wait for it
to be built successfully on Hydra a few times.)
If ‘mkDerivation’ is passed ‘NIX_CFLAGS_COMPILE’, we should include those flags
along with the common flags.
See also: #34039#34038#33935#33933#33930#33927
First, closure size is reduced by including the static libraries in $out instead
of trying to move them to $dev. The Qt build system cannot handle libraries
being split between different prefixes. Previously, the static libraries were
moved into $dev and the shared libraries were symlinked from $out to $dev to
fool the build system. However, this causes $dev to be retained at
runtime. Instead, we now keep the static libraries in $out. Fortunately, the
static libraries are not very large anyway.
Second, we build with QT_NO_DEBUG defined unless debugging is enabled. This
causes some assertions to be removed; when assertions are included, they pull
paths from $dev into the runtime closure by using the __FILE__ macro. We also
now patch qtbase to remove even more assertions when QT_NO_DEBUG is defined.