Some kde wrapper improvements.

This commit is contained in:
Lluís Batlle i Rossell 2013-05-12 16:11:54 +02:00
parent c887f9e932
commit 48f97bdae0

View File

@ -22,8 +22,8 @@ stdenv.mkDerivation {
buildCommand = ''
ensureDir $out/bin
KDEDIRS=
QT_PLUGIN_PATH=
KDEDIRS=${program}
QT_PLUGIN_PATH=${program}/lib/qt4/plugins:${program}/lib/kde4/plugins
for a in $libs; do
KDEDIRS=$a''${KDEDIRS:+:}$KDEDIRS
QT_PLUGIN_PATH=$a/lib/qt4/plugins:$a/lib/kde4/plugins''${QT_PLUGIN_PATH:+:}$QT_PLUGIN_PATH
@ -31,9 +31,10 @@ stdenv.mkDerivation {
for a in ${program}/bin/*; do
PROG=$out/bin/`basename $a`
cat > $PROG << END
export KDEDIRS=$KDEDIRS\''${KDEDIRS:+:}\$KDEDIRS
export QT_PLUGIN_PATH=$QT_PLUGIN_PATH\''${QT_PLUGIN_PATH:+:}\$QT_PLUGIN_PATH
exec $a "\$@"
#!/bin/sh
export KDEDIRS=$KDEDIRS\''${KDEDIRS:+:}\$KDEDIRS
export QT_PLUGIN_PATH=$QT_PLUGIN_PATH\''${QT_PLUGIN_PATH:+:}\$QT_PLUGIN_PATH
exec $a "\$@"
END
chmod +x $PROG
done