2015-10-14 16:44:10 +02:00
|
|
|
wrapQtProgram() {
|
|
|
|
local prog="$1"
|
|
|
|
shift
|
2015-10-18 16:25:50 +02:00
|
|
|
wrapProgram "$prog" \
|
|
|
|
--prefix QT_PLUGIN_PATH : "$QT_PLUGIN_PATH" \
|
|
|
|
--prefix QML_IMPORT_PATH : "$QML_IMPORT_PATH" \
|
|
|
|
--prefix QML2_IMPORT_PATH : "$QML2_IMPORT_PATH" \
|
2016-01-28 03:05:40 +01:00
|
|
|
--prefix XDG_CONFIG_DIRS : "$NIX_WRAP_XDG_CONFIG_DIRS" \
|
|
|
|
--prefix XDG_DATA_DIRS : "$NIX_WRAP_XDG_DATA_DIRS" \
|
2015-10-18 16:25:50 +02:00
|
|
|
"$@"
|
2015-10-14 16:44:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
makeQtWrapper() {
|
|
|
|
local old="$1"
|
|
|
|
local new="$2"
|
|
|
|
shift
|
|
|
|
shift
|
2015-10-18 16:25:50 +02:00
|
|
|
makeWrapper "$old" "$new" \
|
|
|
|
--prefix QT_PLUGIN_PATH : "$QT_PLUGIN_PATH" \
|
|
|
|
--prefix QML_IMPORT_PATH : "$QML_IMPORT_PATH" \
|
|
|
|
--prefix QML2_IMPORT_PATH : "$QML2_IMPORT_PATH" \
|
2016-01-28 03:05:40 +01:00
|
|
|
--prefix XDG_CONFIG_DIRS : "$NIX_WRAP_XDG_CONFIG_DIRS" \
|
|
|
|
--prefix XDG_DATA_DIRS : "$NIX_WRAP_XDG_DATA_DIRS" \
|
2015-10-18 16:25:50 +02:00
|
|
|
"$@"
|
2015-10-14 16:44:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
# cannot use addToSearchPath because these directories may not exist yet
|
2016-01-25 13:24:35 +01:00
|
|
|
export QT_PLUGIN_PATH="$QT_PLUGIN_PATH${QT_PLUGIN_PATH:+:}${!outputLib}/lib/qt5/plugins"
|
|
|
|
export QML_IMPORT_PATH="$QML_IMPORT_PATH${QML_IMPORT_PATH:+:}${!outputLib}/lib/qt5/imports"
|
|
|
|
export QML2_IMPORT_PATH="$QML2_IMPORT_PATH${QML2_IMPORT_PATH:+:}${!outputLib}/lib/qt5/qml"
|
|
|
|
export XDG_CONFIG_DIRS="$XDG_CONFIG_DIRS${XDG_CONFIG_DIRS:+:}${!outputLib}/etc/xdg"
|
|
|
|
export XDG_DATA_DIRS="$XDG_DATA_DIRS${XDG_DATA_DIRS:+:}${!outputLib}/share"
|
2016-01-28 03:05:40 +01:00
|
|
|
export NIX_WRAP_XDG_CONFIG_DIRS="$NIX_WRAP_XDG_CONFIG_DIRS${NIX_WRAP_XDG_CONFIG_DIRS:+:}${!outputLib}/etc/xdg"
|
|
|
|
export NIX_WRAP_XDG_DATA_DIRS="$NIX_WRAP_XDG_DATA_DIRS${NIX_WRAP_XDG_DATA_DIRS:+:}${!outputLib}/share"
|