diff --git a/pkgs/desktops/plasma-5.5/plasma-workspace/0001-qt-5.5-QML-import-paths.patch b/pkgs/desktops/plasma-5.5/plasma-workspace/0001-qt-5.5-QML-import-paths.patch deleted file mode 100644 index fd0d596243b7..000000000000 --- a/pkgs/desktops/plasma-5.5/plasma-workspace/0001-qt-5.5-QML-import-paths.patch +++ /dev/null @@ -1,123 +0,0 @@ -From ec91088ec46358f39a0374b910cd776993c63acf Mon Sep 17 00:00:00 2001 -From: Thomas Tuegel -Date: Mon, 19 Oct 2015 18:55:36 -0500 -Subject: [PATCH 1/2] qt-5.5 QML import paths - ---- - applets/analog-clock/contents/ui/analogclock.qml | 2 +- - applets/batterymonitor/package/contents/ui/BatteryItem.qml | 2 +- - applets/batterymonitor/package/contents/ui/CompactRepresentation.qml | 2 +- - applets/batterymonitor/package/contents/ui/PopupDialog.qml | 2 +- - applets/batterymonitor/package/contents/ui/batterymonitor.qml | 2 +- - applets/lock_logout/contents/ui/lockout.qml | 2 +- - applets/notifications/package/contents/ui/main.qml | 2 +- - applets/systemtray/package/contents/ui/main.qml | 2 +- - 8 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/applets/analog-clock/contents/ui/analogclock.qml b/applets/analog-clock/contents/ui/analogclock.qml -index edb3af9..7eb839d 100644 ---- a/applets/analog-clock/contents/ui/analogclock.qml -+++ b/applets/analog-clock/contents/ui/analogclock.qml -@@ -25,7 +25,7 @@ import org.kde.plasma.calendar 2.0 as PlasmaCalendar - import QtQuick.Layouts 1.1 - - import org.kde.plasma.core 2.0 as PlasmaCore --import "logic.js" as Logic -+import "../code/logic.js" as Logic - - Item { - id: analogclock -diff --git a/applets/batterymonitor/package/contents/ui/BatteryItem.qml b/applets/batterymonitor/package/contents/ui/BatteryItem.qml -index 8d43797..3322369 100644 ---- a/applets/batterymonitor/package/contents/ui/BatteryItem.qml -+++ b/applets/batterymonitor/package/contents/ui/BatteryItem.qml -@@ -26,7 +26,7 @@ import org.kde.plasma.components 2.0 as PlasmaComponents - 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 -diff --git a/applets/batterymonitor/package/contents/ui/CompactRepresentation.qml b/applets/batterymonitor/package/contents/ui/CompactRepresentation.qml -index b4059cb..ae8eeaf 100755 ---- a/applets/batterymonitor/package/contents/ui/CompactRepresentation.qml -+++ b/applets/batterymonitor/package/contents/ui/CompactRepresentation.qml -@@ -24,7 +24,7 @@ import QtQuick.Layouts 1.1 - import org.kde.plasma.core 2.0 as PlasmaCore - import org.kde.plasma.components 2.0 as Components - import org.kde.plasma.workspace.components 2.0 --import "logic.js" as Logic -+import "../code/logic.js" as Logic - - MouseArea { - id: root -diff --git a/applets/batterymonitor/package/contents/ui/PopupDialog.qml b/applets/batterymonitor/package/contents/ui/PopupDialog.qml -index d4952c6..2b6586d 100644 ---- a/applets/batterymonitor/package/contents/ui/PopupDialog.qml -+++ b/applets/batterymonitor/package/contents/ui/PopupDialog.qml -@@ -23,7 +23,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore - import org.kde.plasma.components 2.0 as Components - import org.kde.plasma.extras 2.0 as PlasmaExtras - import org.kde.kquickcontrolsaddons 2.0 --import "logic.js" as Logic -+import "../code/logic.js" as Logic - - FocusScope { - id: dialog -diff --git a/applets/batterymonitor/package/contents/ui/batterymonitor.qml b/applets/batterymonitor/package/contents/ui/batterymonitor.qml -index a086581..6e1e8be 100755 ---- a/applets/batterymonitor/package/contents/ui/batterymonitor.qml -+++ b/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 -diff --git a/applets/lock_logout/contents/ui/lockout.qml b/applets/lock_logout/contents/ui/lockout.qml -index 80e7e53..0083cf0 100644 ---- a/applets/lock_logout/contents/ui/lockout.qml -+++ b/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 -diff --git a/applets/notifications/package/contents/ui/main.qml b/applets/notifications/package/contents/ui/main.qml -index 2871cdb..3f50856 100644 ---- a/applets/notifications/package/contents/ui/main.qml -+++ b/applets/notifications/package/contents/ui/main.qml -@@ -28,7 +28,7 @@ import org.kde.plasma.extras 2.0 as PlasmaExtras - - import org.kde.plasma.private.notifications 1.0 - --import "uiproperties.js" as UiProperties -+import "../code/uiproperties.js" as UiProperties - - MouseEventListener { - id: notificationsApplet -diff --git a/applets/systemtray/package/contents/ui/main.qml b/applets/systemtray/package/contents/ui/main.qml -index 2e26455..864c9c5 100644 ---- a/applets/systemtray/package/contents/ui/main.qml -+++ b/applets/systemtray/package/contents/ui/main.qml -@@ -25,7 +25,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore - // import org.kde.plasma.extras 2.0 as PlasmaExtras - - import org.kde.private.systemtray 2.0 as SystemTray --import "Layout.js" as LayoutManager -+import "../code/Layout.js" as LayoutManager - - Item { - id: root --- -2.6.3 - diff --git a/pkgs/desktops/plasma-5.5/plasma-workspace/default.nix b/pkgs/desktops/plasma-5.5/plasma-workspace/default.nix index 78db6e51511d..2d9364d446eb 100644 --- a/pkgs/desktops/plasma-5.5/plasma-workspace/default.nix +++ b/pkgs/desktops/plasma-5.5/plasma-workspace/default.nix @@ -1,17 +1,19 @@ -{ plasmaPackage, extra-cmake-modules, kdoctools, baloo -, kactivities, kcmutils, kcrash, kdbusaddons, kdeclarative +{ plasmaPackage, lib, copyPathsToStore +, extra-cmake-modules, kdoctools, makeQtWrapper +, baloo, kactivities, kcmutils, kcrash, kdbusaddons, kdeclarative , kdelibs4support, kdesu, kdewebkit, kglobalaccel, kidletime , kjsembed, knewstuff, knotifyconfig, kpackage, krunner , ktexteditor, ktextwidgets, kwallet, kwayland, kwin, kxmlrpcclient , libdbusmenu, libkscreen, libSM, libXcursor, networkmanager-qt , pam, phonon, plasma-framework, qtquick1, qtscript, qtx11extras, wayland , libksysguard, bash, coreutils, gnused, gnugrep, socat, kconfig -, kinit, kservice, makeQtWrapper, qttools, dbus_tools, mkfontdir, xmessage +, kinit, kservice, qttools, dbus_tools, mkfontdir, xmessage , xprop, xrdb, xset, xsetroot, solid, qtquickcontrols }: plasmaPackage rec { name = "plasma-workspace"; + nativeBuildInputs = [ extra-cmake-modules kdoctools @@ -28,11 +30,8 @@ plasmaPackage rec { kidletime krunner ktexteditor kwin libkscreen libksysguard plasma-framework qtquick1 qtquickcontrols qtx11extras solid ]; - patches = [ - ./0001-qt-5.5-QML-import-paths.patch - ./0002-startkde-NixOS-patches.patch - ]; + patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); inherit bash coreutils gnused gnugrep socat; inherit kconfig kinit kservice qttools; inherit dbus_tools mkfontdir xmessage xprop xrdb xset xsetroot; @@ -41,7 +40,14 @@ plasmaPackage rec { substituteInPlace startkde/kstartupconfig/kstartupconfig.cpp \ --replace kdostartupconfig5 $out/bin/kdostartupconfig5 ''; + postInstall = '' + rm "$out/bin/startplasmacompositor" + rm "$out/lib/libexec/startplasma" + rm -r "$out/share/wayland-sessions" + ''; + + postFixup = '' wrapQtProgram "$out/bin/ksmserver" wrapQtProgram "$out/bin/plasmawindowed" wrapQtProgram "$out/bin/kcminit_startup" @@ -54,11 +60,6 @@ plasmaPackage rec { wrapQtProgram "$out/bin/kuiserver5" wrapQtProgram "$out/bin/krunner" wrapQtProgram "$out/bin/plasmashell" - wrapQtProgram "$out/lib/libexec/drkonqi" - - rm "$out/bin/startplasmacompositor" - rm "$out/lib/libexec/startplasma" - rm -r "$out/share/wayland-sessions" ''; } diff --git a/pkgs/desktops/plasma-5.5/plasma-workspace/qml-import-path.patch b/pkgs/desktops/plasma-5.5/plasma-workspace/qml-import-path.patch new file mode 100644 index 000000000000..1d34001be597 --- /dev/null +++ b/pkgs/desktops/plasma-5.5/plasma-workspace/qml-import-path.patch @@ -0,0 +1,104 @@ +Index: plasma-workspace-5.5.1/applets/analog-clock/contents/ui/analogclock.qml +=================================================================== +--- plasma-workspace-5.5.1.orig/applets/analog-clock/contents/ui/analogclock.qml ++++ plasma-workspace-5.5.1/applets/analog-clock/contents/ui/analogclock.qml +@@ -25,7 +25,7 @@ import org.kde.plasma.calendar 2.0 as Pl + import QtQuick.Layouts 1.1 + + import org.kde.plasma.core 2.0 as PlasmaCore +-import "logic.js" as Logic ++import "../code/logic.js" as Logic + + Item { + id: analogclock +Index: plasma-workspace-5.5.1/applets/batterymonitor/package/contents/ui/BatteryItem.qml +=================================================================== +--- plasma-workspace-5.5.1.orig/applets/batterymonitor/package/contents/ui/BatteryItem.qml ++++ plasma-workspace-5.5.1/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.5.1/applets/batterymonitor/package/contents/ui/CompactRepresentation.qml +=================================================================== +--- plasma-workspace-5.5.1.orig/applets/batterymonitor/package/contents/ui/CompactRepresentation.qml ++++ plasma-workspace-5.5.1/applets/batterymonitor/package/contents/ui/CompactRepresentation.qml +@@ -24,7 +24,7 @@ import QtQuick.Layouts 1.1 + import org.kde.plasma.core 2.0 as PlasmaCore + import org.kde.plasma.components 2.0 as Components + import org.kde.plasma.workspace.components 2.0 +-import "logic.js" as Logic ++import "../code/logic.js" as Logic + + MouseArea { + id: root +Index: plasma-workspace-5.5.1/applets/batterymonitor/package/contents/ui/PopupDialog.qml +=================================================================== +--- plasma-workspace-5.5.1.orig/applets/batterymonitor/package/contents/ui/PopupDialog.qml ++++ plasma-workspace-5.5.1/applets/batterymonitor/package/contents/ui/PopupDialog.qml +@@ -23,7 +23,7 @@ import org.kde.plasma.core 2.0 as Plasma + import org.kde.plasma.components 2.0 as Components + import org.kde.plasma.extras 2.0 as PlasmaExtras + import org.kde.kquickcontrolsaddons 2.0 +-import "logic.js" as Logic ++import "../code/logic.js" as Logic + + FocusScope { + id: dialog +Index: plasma-workspace-5.5.1/applets/batterymonitor/package/contents/ui/batterymonitor.qml +=================================================================== +--- plasma-workspace-5.5.1.orig/applets/batterymonitor/package/contents/ui/batterymonitor.qml ++++ plasma-workspace-5.5.1/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.5.1/applets/lock_logout/contents/ui/lockout.qml +=================================================================== +--- plasma-workspace-5.5.1.orig/applets/lock_logout/contents/ui/lockout.qml ++++ plasma-workspace-5.5.1/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.5.1/applets/notifications/package/contents/ui/main.qml +=================================================================== +--- plasma-workspace-5.5.1.orig/applets/notifications/package/contents/ui/main.qml ++++ plasma-workspace-5.5.1/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 +Index: plasma-workspace-5.5.1/applets/systemtray/package/contents/ui/main.qml +=================================================================== +--- plasma-workspace-5.5.1.orig/applets/systemtray/package/contents/ui/main.qml ++++ plasma-workspace-5.5.1/applets/systemtray/package/contents/ui/main.qml +@@ -25,7 +25,7 @@ import org.kde.plasma.core 2.0 as Plasma + // import org.kde.plasma.extras 2.0 as PlasmaExtras + + import org.kde.private.systemtray 2.0 as SystemTray +-import "Layout.js" as LayoutManager ++import "../code/Layout.js" as LayoutManager + + Item { + id: root diff --git a/pkgs/desktops/plasma-5.5/plasma-workspace/series b/pkgs/desktops/plasma-5.5/plasma-workspace/series new file mode 100644 index 000000000000..88b54af793e7 --- /dev/null +++ b/pkgs/desktops/plasma-5.5/plasma-workspace/series @@ -0,0 +1,2 @@ +startkde.patch +qml-import-path.patch diff --git a/pkgs/desktops/plasma-5.5/plasma-workspace/0002-startkde-NixOS-patches.patch b/pkgs/desktops/plasma-5.5/plasma-workspace/startkde.patch similarity index 90% rename from pkgs/desktops/plasma-5.5/plasma-workspace/0002-startkde-NixOS-patches.patch rename to pkgs/desktops/plasma-5.5/plasma-workspace/startkde.patch index 4b458580633a..802c92da64d0 100644 --- a/pkgs/desktops/plasma-5.5/plasma-workspace/0002-startkde-NixOS-patches.patch +++ b/pkgs/desktops/plasma-5.5/plasma-workspace/startkde.patch @@ -1,16 +1,7 @@ -From e5c11a5efc4f8e8ba4e89e0172220da921df38c6 Mon Sep 17 00:00:00 2001 -From: Thomas Tuegel -Date: Wed, 9 Dec 2015 13:20:02 -0600 -Subject: [PATCH 2/2] startkde NixOS patches - ---- - startkde/startkde.cmake | 211 ++++++++++++++++++++---------------------------- - 1 file changed, 89 insertions(+), 122 deletions(-) - -diff --git a/startkde/startkde.cmake b/startkde/startkde.cmake -index 37ab5cd..130578e 100644 ---- a/startkde/startkde.cmake -+++ b/startkde/startkde.cmake +Index: plasma-workspace-5.5.1/startkde/startkde.cmake +=================================================================== +--- plasma-workspace-5.5.1.orig/startkde/startkde.cmake ++++ plasma-workspace-5.5.1/startkde/startkde.cmake @@ -1,8 +1,31 @@ -#!/bin/sh +#!@bash@/bin/bash @@ -44,7 +35,7 @@ index 37ab5cd..130578e 100644 if test "x$1" = x--failsafe; then KDE_FAILSAFE=1 # General failsafe flag KWIN_COMPOSE=N # Disable KWin's compositing -@@ -16,29 +39,16 @@ trap 'echo GOT SIGHUP' HUP +@@ -17,29 +40,16 @@ trap 'echo GOT SIGHUP' HUP # we have to unset this for Darwin since it will screw up KDE's dynamic-loading unset DYLD_FORCE_FLAT_NAMESPACE @@ -78,7 +69,7 @@ index 37ab5cd..130578e 100644 fi # Boot sequence: -@@ -56,13 +66,8 @@ fi +@@ -57,13 +67,8 @@ fi # * Then ksmserver is started which takes control of the rest of the startup sequence # We need to create config folder so we can write startupconfigkeys @@ -94,7 +85,7 @@ index 37ab5cd..130578e 100644 #This is basically setting defaults so we can use them with kstartupconfig5 cat >$configDir/startupconfigkeys <&2 @@ -273,7 +264,7 @@ index 37ab5cd..130578e 100644 # Mark that full KDE session is running (e.g. Konqueror preloading works only # with full KDE running). The KDE_FULL_SESSION property can be detected by # any X client connected to the same X session, even if not launched -@@ -317,11 +279,11 @@ fi +@@ -318,11 +280,11 @@ fi # KDE_FULL_SESSION=true export KDE_FULL_SESSION @@ -287,7 +278,7 @@ index 37ab5cd..130578e 100644 KDE_SESSION_UID=`id -ru` export KDE_SESSION_UID -@@ -331,11 +293,11 @@ export XDG_CURRENT_DESKTOP +@@ -332,11 +294,11 @@ export XDG_CURRENT_DESKTOP # At this point all the environment is ready, let's send it to kwalletd if running if test -n "$PAM_KWALLET_LOGIN" ; then @@ -301,7 +292,7 @@ index 37ab5cd..130578e 100644 fi # At this point all environment variables are set, let's send it to the DBus session server to update the activation environment -@@ -348,21 +310,26 @@ if test $? -ne 0; then +@@ -349,21 +311,26 @@ if test $? -ne 0; then # Startup error echo 'startkde: Could not sync environment to dbus.' 1>&2 test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null @@ -331,7 +322,7 @@ index 37ab5cd..130578e 100644 # finally, give the session control to the session manager # see kdebase/ksmserver for the description of the rest of the startup sequence # if the KDEWM environment variable has been set, then it will be used as KDE's -@@ -378,27 +345,27 @@ test -n "$KDEWM" && KDEWM="--windowmanager $KDEWM" +@@ -379,27 +346,27 @@ test -n "$KDEWM" && KDEWM="--windowmanag # lock now and do the rest of the KDE startup underneath the locker. KSMSERVEROPTIONS="" test -n "$dl" && KSMSERVEROPTIONS=" --lockscreen" @@ -366,23 +357,13 @@ index 37ab5cd..130578e 100644 done break fi -@@ -410,21 +377,21 @@ echo 'startkde: Shutting down...' 1>&2 +@@ -411,12 +378,12 @@ echo 'startkde: Shutting down...' 1>&2 test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null # Clean up -kdeinit5_shutdown +@kinit@/bin/kdeinit5_shutdown - echo 'startkde: Running shutdown scripts...' 1>&2 - - # Run scripts found in /plasma-workspace/shutdown - for prefix in `echo "$scriptpath"`; do -- for file in `ls "$prefix"/shutdown 2> /dev/null | egrep -v '(~|\.bak)$'`; do -+ for file in `ls "$prefix"/shutdown 2> /dev/null | @gnugrep@/bin/egrep -v '(~|\.bak)$'`; do - test -x "$prefix/shutdown/$file" && "$prefix/shutdown/$file" - done - done - unset KDE_FULL_SESSION -xprop -root -remove KDE_FULL_SESSION +@xprop@/bin/xprop -root -remove KDE_FULL_SESSION @@ -392,6 +373,3 @@ index 37ab5cd..130578e 100644 unset KDE_SESSION_UID echo 'startkde: Done.' 1>&2 --- -2.6.3 -