mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-11 15:08:33 +01:00
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.
This commit is contained in:
parent
39c76445b9
commit
e40579d91e
|
@ -20,12 +20,6 @@ mkDerivation (args // {
|
|||
dontFixLibtool = args.dontFixLibtool or true;
|
||||
configureScript = args.configureScript or "qmake";
|
||||
|
||||
/*
|
||||
preConfigure = ''
|
||||
export PATH="$out/bin:$PATH"
|
||||
'';
|
||||
*/
|
||||
|
||||
postInstall = ''
|
||||
rm "$out/bin/qmake" "$out/bin/qt.conf"
|
||||
|
||||
|
|
|
@ -25,6 +25,18 @@ addQtModule() {
|
|||
if [[ -n $qtSubmodule ]]; then
|
||||
find "$1/lib" -printf 'lib/%P\n' >> "$qtOut/nix-support/qt-inputs"
|
||||
fi
|
||||
|
||||
if [[ -d "$1/lib/qt5/plugins" ]]; then
|
||||
QT_PLUGIN_PATH="$QT_PLUGIN_PATH${QT_PLUGIN_PATH:+:}$1/lib/qt5/plugins";
|
||||
fi
|
||||
|
||||
if [[ -d "$1/lib/qt5/imports" ]]; then
|
||||
QML_IMPORT_PATH="$QML_IMPORT_PATH${QML_IMPORT_PATH:+:}$1/lib/qt5/imports";
|
||||
fi
|
||||
|
||||
if [[ -d "$1/lib/qt5/qml" ]]; then
|
||||
QML2_IMPORT_PATH="$QML2_IMPORT_PATH${QML2_IMPORT_PATH:+:}$1/lib/qt5/qml";
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue