plasma-workspace: enable Wayland session support

This commit is contained in:
Thomas Tuegel 2017-10-19 18:22:03 -05:00
parent f7de0da188
commit ebcccaf754
No known key found for this signature in database
GPG Key ID: 22CBF5249D4B4D59
5 changed files with 1235 additions and 67 deletions

@ -47,7 +47,7 @@ in
${getBin config.hardware.pulseaudio.package}/bin/pactl load-module module-device-manager "do_routing=1"
''}
exec "${plasma5.startkde}"
exec "${getBin plasma5.plasma-workspace}/bin/startkde"
'';
};

@ -1,19 +1,23 @@
{
mkDerivation, lib, copyPathsToStore,
mkDerivation, lib,
extra-cmake-modules, kdoctools,
isocodes, libdbusmenu, libSM, libXcursor, libXtst, pam, wayland,
coreutils, dbus, gnugrep, gnused, isocodes, libdbusmenu, libSM, libXcursor,
libXtst, pam, wayland, xmessage, xprop, xrdb, xsetroot,
baloo, kactivities, kcmutils, kconfig, kcrash, kdbusaddons, kdeclarative,
kdelibs4support, kdesu, kglobalaccel, kidletime, kjsembed, knewstuff,
kdelibs4support, kdesu, kglobalaccel, kidletime, kinit, kjsembed, knewstuff,
knotifyconfig, kpackage, krunner, kscreenlocker, ktexteditor, ktextwidgets,
kwallet, kwayland, kwin, kxmlrpcclient, libkscreen, libksysguard,
networkmanager-qt, phonon, plasma-framework, prison, solid,
qtgraphicaleffects, qtquickcontrols, qtquickcontrols2, qtscript, qtx11extras,
qtgraphicaleffects, qtquickcontrols, qtquickcontrols2, qtscript, qttools,
qtwayland, qtx11extras,
}:
let inherit (lib) getBin getLib; in
mkDerivation {
name = "plasma-workspace";
@ -27,21 +31,47 @@ mkDerivation {
kwallet kwayland kwin kxmlrpcclient libkscreen libksysguard
networkmanager-qt phonon plasma-framework prison solid
qtgraphicaleffects qtquickcontrols qtquickcontrols2 qtscript qtx11extras
qtgraphicaleffects qtquickcontrols qtquickcontrols2 qtscript qtwayland qtx11extras
];
outputs = [ "out" "dev" "bin" ];
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
cmakeFlags = [
"-DNIXPKGS_XMESSAGE=${getBin xmessage}/bin/xmessage"
"-DNIXPKGS_MKDIR=${getBin coreutils}/bin/mkdir"
"-DNIXPKGS_XRDB=${getBin xrdb}/bin/xrdb"
"-DNIXPKGS_QTPATHS=${getBin qttools}/bin/qtpaths"
"-DNIXPKGS_XSETROOT=${getBin xsetroot}/bin/xsetroot"
"-DNIXPKGS_XPROP=${getBin xprop}/bin/xprop"
"-DNIXPKGS_ID=${getBin coreutils}/bin/id"
"-DNIXPKGS_DBUS_UPDATE_ACTIVATION_ENVIRONMENT=${getBin dbus}/bin/dbus-update-activation-environment"
"-DNIXPKGS_START_KDEINIT_WRAPPER=${getLib kinit}/lib/libexec/kf5/start_kdeinit_wrapper"
"-DNIXPKGS_QDBUS=${getBin qttools}/bin/qdbus"
"-DNIXPKGS_KWRAPPER5=${getBin kinit}/bin/kwrapper5"
"-DNIXPKGS_KREADCONFIG5=${getBin kconfig}/bin/kreadconfig5"
"-DNIXPKGS_GREP=${getBin gnugrep}/bin/grep"
"-DNIXPKGS_KDEINIT5_SHUTDOWN=${getBin kinit}/bin/kdeinit5_shutdown"
"-DNIXPKGS_SED=${getBin gnused}/bin/sed"
];
postPatch = ''
substituteInPlace startkde/kstartupconfig/kstartupconfig.cpp \
--replace kdostartupconfig5 ''${!outputBin}/bin/kdostartupconfig5
# To regenerate ./plasma-workspace.patch,
#
# > git clone https://github.com/ttuegel/plasma-workspace
# > cd plasma-workspace
# > git checkout nixpkgs/$x.$y # where $x.$y.$z == $version
# ... make some commits ...
# > git diff v$x.$y.$z
#
# Add upstream patches to the list below. For new patchs, particularly if not
# submitted upstream, please make a pull request and add it to
# ./plasma-workspace.patch.
patches = [ ./plasma-workspace.patch ];
preConfigure = ''
NIX_CFLAGS_COMPILE+=" -DNIXPKGS_KDOSTARTUPCONFIG5=\"''${!outputBin}/bin/kdostartupconfig5\""
cmakeFlags+=" -DNIXPKGS_STARTPLASMA=''${!outputBin}/lib/libexec/startplasma"
'';
postInstall = ''
rm "''${!outputBin}/bin/startkde"
rm "''${!outputBin}/bin/startplasmacompositor"
rm "''${!outputLib}/lib/libexec/startplasma"
rm -r "''${!outputBin}/share/wayland-sessions"
moveToOutput lib/libexec/startplasma ''${!outputBin}
'';
}

File diff suppressed because it is too large Load Diff

@ -1,52 +0,0 @@
Index: plasma-workspace-5.6.3/applets/batterymonitor/package/contents/ui/BatteryItem.qml
===================================================================
--- plasma-workspace-5.6.3.orig/applets/batterymonitor/package/contents/ui/BatteryItem.qml
+++ plasma-workspace-5.6.3/applets/batterymonitor/package/contents/ui/BatteryItem.qml
@@ -26,7 +26,7 @@ import org.kde.plasma.components 2.0 as
import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.plasma.workspace.components 2.0
import org.kde.kcoreaddons 1.0 as KCoreAddons
-import "logic.js" as Logic
+import "../code/logic.js" as Logic
Item {
id: batteryItem
Index: plasma-workspace-5.6.3/applets/batterymonitor/package/contents/ui/batterymonitor.qml
===================================================================
--- plasma-workspace-5.6.3.orig/applets/batterymonitor/package/contents/ui/batterymonitor.qml
+++ plasma-workspace-5.6.3/applets/batterymonitor/package/contents/ui/batterymonitor.qml
@@ -25,7 +25,7 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.kcoreaddons 1.0 as KCoreAddons
import org.kde.kquickcontrolsaddons 2.0
-import "logic.js" as Logic
+import "../code/logic.js" as Logic
Item {
id: batterymonitor
Index: plasma-workspace-5.6.3/applets/lock_logout/contents/ui/lockout.qml
===================================================================
--- plasma-workspace-5.6.3.orig/applets/lock_logout/contents/ui/lockout.qml
+++ plasma-workspace-5.6.3/applets/lock_logout/contents/ui/lockout.qml
@@ -23,7 +23,7 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0
import org.kde.kquickcontrolsaddons 2.0
-import "data.js" as Data
+import "../code/data.js" as Data
Flow {
id: lockout
Index: plasma-workspace-5.6.3/applets/notifications/package/contents/ui/main.qml
===================================================================
--- plasma-workspace-5.6.3.orig/applets/notifications/package/contents/ui/main.qml
+++ plasma-workspace-5.6.3/applets/notifications/package/contents/ui/main.qml
@@ -28,7 +28,7 @@ import org.kde.plasma.extras 2.0 as Plas
import org.kde.plasma.private.notifications 1.0
-import "uiproperties.js" as UiProperties
+import "../code/uiproperties.js" as UiProperties
MouseEventListener {
id: notificationsApplet

@ -1 +0,0 @@
qml-import-path.patch