Fixes this problem, when building apps in QtCreator:
...(compile output window)
g++ -Wl,-rpath,/nix/store/1w7h7p6s2srfw2ady90k7072991lrnpp-qtbase-5.4.2/lib \
-o qt-test3 main.o mainwindow.o moc_mainwindow.o \
-L/nix/store/1w7h7p6s2srfw2ady90k7072991lrnpp-qtbase-5.4.2/lib \
-lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
/nix/store/b8qhjrwf8sf9ggkjxqqav7f1m6w83bh0-binutils-2.23.1/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
mesa is already in the closure of Qt, so there is no size increase.
The patch is copied into both qt-5.3 and qt-5.4 directories, like other
patches are.
Note that programs still can _run_ against a different libGL (e.g. one
provided by nvidia) by configuring the dynamic linker. For instance,
NixOS sets the LD_LIBRARY_PATH environment variable to
/run/opengl-driver/lib/, meaning that whatever libGL is found there
will be used instead of the default (mesa).
Set QT_PLUGIN_PATH, QML_IMPORT_PATH, and QML2_IMPORT_PATH during build
so that Qt programs may easily be wrapped for use outside NixOS. The
paths are set appropriately for the dependencies of the package.
Due to a bug somewhere, the qt documentation is by default placed in
$out/share/doc although "qmake -query" reports $out/doc. That
discrepancy causes qtcreator withDocumentation builds to fail. This
fixes it.
If not explicitly disabled, Qt tries to detect support for the various
instruction sets. As a result, binaries built on Hydra may use
instruction sets unsupported by clients.
This disables propagated of Qt 5 build inputs at the request of
@edolstra. If this breaks your build, you need to add the missing
dependencies yourself. If this breaks your package at runtime, you need
to wrap your package to set either the plugin path or the QML import
path.
This commit also removes the 5.2 branch in favor of 5.3. Several
components of KDE5 require Qt 5.3, so it doesn't make much sense to have
the rest of the system on an older version. Also, the application styles
may not be compatible because Qt breaks ABI compatibility between versions.
Qt5 currently hardcodes /usr/{share,lib}/X11/locale/. Fix it to use
paths from the nix store. Qt4 is unaffected.
This fixes a startup warning for applications built with qt5 (e.g.
qtcreator, shotcut):
Qt Warning: Could not find a location of the system's Compose files. Consider setting the QTCOMPOSE environment variable.