From 79be4a769f2367b450eef88f064cbf6d36d0d9bd Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sun, 27 Sep 2015 16:06:29 -0500 Subject: manual: document Qt packaging tools --- doc/language-support.xml | 66 ++++++++++++++++++++++++++++++++++++++++++++++++ doc/stdenv.xml | 2 +- 2 files changed, 67 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/language-support.xml b/doc/language-support.xml index a969111ed77c..48b9209b0ad0 100644 --- a/doc/language-support.xml +++ b/doc/language-support.xml @@ -981,6 +981,72 @@ stdenv.mkDerivation { +
Qt + +The information in this section applies to Qt 5.5 and later. + +Qt is an application development toolkit for C++. Although it is +not a distinct programming language, there are special considerations +for packaging Qt-based programs and libraries. A small set of tools +and conventions has grown out of these considerations. + +
Libraries + +Packages that provide libraries should be listed in +qt5LibsFun so that the library is built with each +Qt version. A set of packages is provided for each version of Qt; for +example, qt5Libs always provides libraries built +with the latest version, qt55Libs provides +libraries built with Qt 5.5, and so on. To avoid version conflicts, no +top-level attributes are created for these packages. + +
+ +
Programs + +Application packages do not need to be built with every Qt +version. To ensure consistency between the package's dependencies, +call the package with qt5Libs.callPackage instead +of the usual callPackage. An older version may be +selected in case of incompatibility. For example, to build with Qt +5.5, call the package with +qt55Libs.callPackage. + +Several environment variables must be set at runtime for Qt +applications to function correctly, including: + + + QT_PLUGIN_PATH + QML_IMPORT_PATH + QML2_IMPORT_PATH + XDG_DATA_DIRS + + +To ensure that these are set correctly, the program must be wrapped by +invoking wrapQtProgram program +during installation (for example, during +fixupPhase). wrapQtProgram +accepts the same options as makeWrapper. + + +
+ +
KDE + +Many of the considerations above also apply to KDE packages, +especially the need to set the correct environment variables at +runtime. To ensure that this is done, invoke wrapKDEProgram +program during +installation. wrapKDEProgram also generates a +ksycoca database so that required data and services +can be found. Like its Qt counterpart, +wrapKDEProgram accepts the same options as +makeWrapper. + +
+ +
+