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.
Plugin and QML import paths were previously determined by NIX_PROFILES. Using
PATH instead allows Qt applications to work under nix-shell without further modification.
Including apple_sdk.sdk is generally a recipe for a bad time on LLVM 3.8
and above, since you end up with bad headers in the wrong place that hurt
the new libc++ in 3.8 and above. In this case, qt only wanted the super-
generic SDK for CUPS headers, which we can just depend on directly now.
qtquickcontrols2, qtwebkit.
Added in the same order as the modules are listed in default.nix (and
then reformatted the block).
(The qt55 expression already has all modules in *full.)
So that pkg-config can be used to find 'moc' etc. (Currently it points
to a non-existing path.)
Fixes#22945 ('Linux kbuild incompatible with "nix-shell -p qt5.full"').
- qtbase builds on darwin
- Downstream qmake and cmake build configurations supported
Darwin-specific changes:
Prevent `qmake -project` from adding build support files in the temp
directory to the project.
Shrink the temp directory used for building with qmake.
The issue here is that `lndir` recreates the entire directory structure
of the module we are merging into the temporary build environment. On
darwin, the framework directory structures mean that this shadow
directory tree is 17MB even though the file contents are all symlinks
into the store.
To address this, we symlink the framework directories explicitly and
use `lndir` for everything else.