qt54: set runtime env vars during build for makeWrapper

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.

+12 -6
-6
pkgs/development/libraries/qt-5/5.4/qt-submodule.nix
··· 20 dontFixLibtool = args.dontFixLibtool or true; 21 configureScript = args.configureScript or "qmake"; 22 23 - /* 24 - preConfigure = '' 25 - export PATH="$out/bin:$PATH" 26 - ''; 27 - */ 28 - 29 postInstall = '' 30 rm "$out/bin/qmake" "$out/bin/qt.conf" 31
··· 20 dontFixLibtool = args.dontFixLibtool or true; 21 configureScript = args.configureScript or "qmake"; 22 23 postInstall = '' 24 rm "$out/bin/qmake" "$out/bin/qt.conf" 25
+12
pkgs/development/libraries/qt-5/5.4/setup-hook.sh
··· 25 if [[ -n $qtSubmodule ]]; then 26 find "$1/lib" -printf 'lib/%P\n' >> "$qtOut/nix-support/qt-inputs" 27 fi 28 fi 29 fi 30 }
··· 25 if [[ -n $qtSubmodule ]]; then 26 find "$1/lib" -printf 'lib/%P\n' >> "$qtOut/nix-support/qt-inputs" 27 fi 28 + 29 + if [[ -d "$1/lib/qt5/plugins" ]]; then 30 + QT_PLUGIN_PATH="$QT_PLUGIN_PATH${QT_PLUGIN_PATH:+:}$1/lib/qt5/plugins"; 31 + fi 32 + 33 + if [[ -d "$1/lib/qt5/imports" ]]; then 34 + QML_IMPORT_PATH="$QML_IMPORT_PATH${QML_IMPORT_PATH:+:}$1/lib/qt5/imports"; 35 + fi 36 + 37 + if [[ -d "$1/lib/qt5/qml" ]]; then 38 + QML2_IMPORT_PATH="$QML2_IMPORT_PATH${QML2_IMPORT_PATH:+:}$1/lib/qt5/qml"; 39 + fi 40 fi 41 fi 42 }