kde5.startkde: append extra PATH elements; set Qt search paths
This commit is contained in:
parent
1cb4aacf18
commit
949277ed0a
@ -1,16 +1,15 @@
|
|||||||
{ stdenv, lib, runCommand
|
{
|
||||||
, dbus, qttools, socat
|
stdenv, lib, runCommand, dbus, qttools, socat, gnugrep, gnused, kconfig,
|
||||||
, gnugrep, gnused
|
kinit, kservice, plasma-workspace, xmessage, xprop, xsetroot, qtbase,
|
||||||
, kconfig, kinit, kservice
|
qtdeclarative, qtgraphicaleffects, qtquickcontrols, qtscript, qtsvg,
|
||||||
, plasma-workspace
|
qtx11extras, qtxmlpatterns
|
||||||
, xmessage, xprop, xsetroot
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
env = {
|
env = {
|
||||||
inherit (stdenv) shell;
|
inherit (stdenv) shell;
|
||||||
paths = builtins.map (pkg: pkg.out or pkg)
|
bins = builtins.map (pkg: pkg.out or pkg)
|
||||||
[
|
[
|
||||||
dbus qttools socat
|
dbus qttools socat
|
||||||
gnugrep gnused
|
gnugrep gnused
|
||||||
@ -18,15 +17,38 @@ let
|
|||||||
plasma-workspace
|
plasma-workspace
|
||||||
xmessage xprop xsetroot
|
xmessage xprop xsetroot
|
||||||
];
|
];
|
||||||
|
libs = builtins.map (pkg: pkg.out or pkg)
|
||||||
|
[
|
||||||
|
qtbase qtdeclarative qtgraphicaleffects qtquickcontrols
|
||||||
|
qtscript qtsvg qtx11extras qtxmlpatterns
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
in runCommand "startkde" env ''
|
in runCommand "startkde" env ''
|
||||||
prefix_PATH=
|
|
||||||
for pkg in $paths; do
|
# Configure PATH variable
|
||||||
addToSearchPath prefix_PATH "$pkg/bin"
|
suffixPATH=
|
||||||
addToSearchPath prefix_PATH "$pkg/lib/libexec"
|
for p in $bins; do
|
||||||
addToSearchPath prefix_PATH "$pkg/lib/libexec/kf5"
|
addToSearchPath suffixPATH "$p/bin"
|
||||||
|
addToSearchPath suffixPATH "$p/lib/libexec"
|
||||||
|
addToSearchPath suffixPATH "$p/lib/libexec/kf5"
|
||||||
done
|
done
|
||||||
substitute ${./startkde.sh} "$out" --subst-var shell --subst-var prefix_PATH
|
|
||||||
|
# Configure Qt search paths
|
||||||
|
QT_PLUGIN_PATH=
|
||||||
|
QML_IMPORT_PATH=
|
||||||
|
QML2_IMPORT_PATH=
|
||||||
|
for p in $libs; do
|
||||||
|
addToSearchPath QT_PLUGIN_PATH "$p/lib/qt5/plugins"
|
||||||
|
addToSearchPath QML_IMPORT_PATH "$p/lib/qt5/imports"
|
||||||
|
addToSearchPath QML2_IMPORT_PATH "$p/lib/qt5/qml"
|
||||||
|
done
|
||||||
|
|
||||||
|
substitute ${./startkde.sh} "$out" \
|
||||||
|
--subst-var shell \
|
||||||
|
--subst-var suffixPATH \
|
||||||
|
--subst-var QT_PLUGIN_PATH \
|
||||||
|
--subst-var QML_IMPORT_PATH \
|
||||||
|
--subst-var QML2_IMPORT_PATH
|
||||||
chmod +x "$out"
|
chmod +x "$out"
|
||||||
''
|
''
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
#!@shell@
|
#!@shell@
|
||||||
|
|
||||||
PATH="@prefix_PATH@:$PATH"
|
PATH="$PATH${PATH:+:}@suffixPATH@"
|
||||||
|
|
||||||
|
export QT_PLUGIN_PATH="$QT_PLUGIN_PATH${QT_PLUGIN_PATH:+:}@QT_PLUGIN_PATH@"
|
||||||
|
export QML_IMPORT_PATH="$QML_IMPORT_PATH${QML_IMPORT_PATH:+:}@QML_IMPORT_PATH@"
|
||||||
|
export QML2_IMPORT_PATH="$QML2_IMPORT_PATH${QML2_IMPORT_PATH:+:}@QML2_IMPORT_PATH@"
|
||||||
|
|
||||||
# The KDE icon cache is supposed to update itself
|
# The KDE icon cache is supposed to update itself
|
||||||
# automatically, but it uses the timestamp on the icon
|
# automatically, but it uses the timestamp on the icon
|
||||||
|
Loading…
x
Reference in New Issue
Block a user