makeQtWrapper: always wrap impurely

This commit is contained in:
Thomas Tuegel 2015-10-18 09:25:50 -05:00
parent 5292e67e50
commit 5a2c45427b
2 changed files with 10 additions and 30 deletions

View file

@ -28,9 +28,6 @@ plasmaPackage rec {
kidletime krunner ktexteditor kwin libkscreen libksysguard
plasma-framework qtquick1 qtquickcontrols qtx11extras solid
];
# All propagatedBuildInputs should be present in the profile because
# impure wrappers are used below.
propagatedUserEnvPkgs = propagatedBuildInputs;
patches = [ ./0001-startkde-NixOS-patches.patch ];
inherit bash coreutils gnused gnugrep socat;
@ -42,7 +39,6 @@ plasmaPackage rec {
--replace kdostartupconfig5 $out/bin/kdostartupconfig5
'';
postInstall = ''
export QT_WRAPPER_IMPURE=1
wrapQtProgram "$out/bin/ksmserver"
wrapQtProgram "$out/bin/plasmawindowed"
wrapQtProgram "$out/bin/kcminit_startup"

View file

@ -8,19 +8,11 @@ addQtDependency() {
wrapQtProgram() {
local prog="$1"
shift
if [[ -n "$QT_WRAPPER_IMPURE" ]]; then
wrapProgram "$prog" \
--prefix QT_PLUGIN_PATH : "$QT_PLUGIN_PATH" \
--prefix QML_IMPORT_PATH : "$QML_IMPORT_PATH" \
--prefix QML2_IMPORT_PATH : "$QML2_IMPORT_PATH" \
"$@"
else
wrapProgram "$prog" \
--set QT_PLUGIN_PATH "$QT_PLUGIN_PATH" \
--set QML_IMPORT_PATH "$QML_IMPORT_PATH" \
--set QML2_IMPORT_PATH "$QML2_IMPORT_PATH" \
"$@"
fi
wrapProgram "$prog" \
--prefix QT_PLUGIN_PATH : "$QT_PLUGIN_PATH" \
--prefix QML_IMPORT_PATH : "$QML_IMPORT_PATH" \
--prefix QML2_IMPORT_PATH : "$QML2_IMPORT_PATH" \
"$@"
}
makeQtWrapper() {
@ -28,19 +20,11 @@ makeQtWrapper() {
local new="$2"
shift
shift
if [[ -n "$QT_WRAPPER_IMPURE" ]]; then
makeWrapper "$old" "$new" \
--prefix QT_PLUGIN_PATH : "$QT_PLUGIN_PATH" \
--prefix QML_IMPORT_PATH : "$QML_IMPORT_PATH" \
--prefix QML2_IMPORT_PATH : "$QML2_IMPORT_PATH" \
"$@"
else
makeWrapper "$old" "$new" \
--set QT_PLUGIN_PATH "$QT_PLUGIN_PATH" \
--set QML_IMPORT_PATH "$QML_IMPORT_PATH" \
--set QML2_IMPORT_PATH "$QML2_IMPORT_PATH" \
"$@"
fi
makeWrapper "$old" "$new" \
--prefix QT_PLUGIN_PATH : "$QT_PLUGIN_PATH" \
--prefix QML_IMPORT_PATH : "$QML_IMPORT_PATH" \
--prefix QML2_IMPORT_PATH : "$QML2_IMPORT_PATH" \
"$@"
}
# cannot use addToSearchPath because these directories may not exist yet