about summary refs log tree commit diff
path: root/pkgs/desktops/plasma-5/plasma-desktop
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@mailbox.org>2017-02-25 13:35:00 -0600
committerThomas Tuegel <ttuegel@mailbox.org>2017-02-27 11:49:12 -0600
commit7f84ad5f4c4a2aac98ebb2f4a37a02915e357939 (patch)
tree2b2777319ca8bd22e5e5797f51ad91df0a5cd0f8 /pkgs/desktops/plasma-5/plasma-desktop
parent8eb4d2afbc1d61d316073f25f5885a46ccb37ea2 (diff)
downloadnixlib-7f84ad5f4c4a2aac98ebb2f4a37a02915e357939.tar
nixlib-7f84ad5f4c4a2aac98ebb2f4a37a02915e357939.tar.gz
nixlib-7f84ad5f4c4a2aac98ebb2f4a37a02915e357939.tar.bz2
nixlib-7f84ad5f4c4a2aac98ebb2f4a37a02915e357939.tar.lz
nixlib-7f84ad5f4c4a2aac98ebb2f4a37a02915e357939.tar.xz
nixlib-7f84ad5f4c4a2aac98ebb2f4a37a02915e357939.tar.zst
nixlib-7f84ad5f4c4a2aac98ebb2f4a37a02915e357939.zip
plasma5: Move to desktops/plasma-5
Diffstat (limited to 'pkgs/desktops/plasma-5/plasma-desktop')
-rw-r--r--pkgs/desktops/plasma-5/plasma-desktop/default.nix44
-rw-r--r--pkgs/desktops/plasma-5/plasma-desktop/hwclock-path.patch24
-rw-r--r--pkgs/desktops/plasma-5/plasma-desktop/ibus.patch26
-rw-r--r--pkgs/desktops/plasma-5/plasma-desktop/qml-import-paths.patch54
-rw-r--r--pkgs/desktops/plasma-5/plasma-desktop/series4
-rw-r--r--pkgs/desktops/plasma-5/plasma-desktop/tzdir.patch18
6 files changed, 170 insertions, 0 deletions
diff --git a/pkgs/desktops/plasma-5/plasma-desktop/default.nix b/pkgs/desktops/plasma-5/plasma-desktop/default.nix
new file mode 100644
index 000000000000..21ceec25d53f
--- /dev/null
+++ b/pkgs/desktops/plasma-5/plasma-desktop/default.nix
@@ -0,0 +1,44 @@
+{
+  plasmaPackage, lib, copyPathsToStore,
+  ecm, kdoctools,
+  attica, baloo, boost, fontconfig, ibus, kactivities, kactivities-stats, kauth,
+  kcmutils, kdbusaddons, kdeclarative, kded, kdelibs4support, kemoticons,
+  kglobalaccel, ki18n, kitemmodels, knewstuff, knotifications, knotifyconfig,
+  kpeople, krunner, ksysguard, kwallet, kwin, libXcursor, libXft,
+  libcanberra_kde, libpulseaudio, libxkbfile, phonon, plasma-framework,
+  plasma-workspace, qtdeclarative, qtquickcontrols, qtsvg, qtx11extras,
+  xf86inputevdev, xf86inputsynaptics, xinput, xkeyboard_config, xorgserver,
+  utillinux
+}:
+
+plasmaPackage rec {
+  name = "plasma-desktop";
+  nativeBuildInputs = [ ecm kdoctools ];
+  buildInputs = [
+    attica boost fontconfig ibus kcmutils kdbusaddons kded kitemmodels knewstuff
+    knotifications knotifyconfig kwallet libcanberra_kde libXcursor
+    libpulseaudio libXft libxkbfile phonon qtsvg xf86inputevdev
+    xf86inputsynaptics xkeyboard_config xinput baloo kactivities
+    kactivities-stats kauth kdeclarative kdelibs4support kemoticons kglobalaccel
+    ki18n kpeople krunner kwin plasma-framework plasma-workspace qtdeclarative
+    qtquickcontrols qtx11extras ksysguard
+  ];
+
+  patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
+  postPatch = ''
+    substituteInPlace kcms/dateandtime/helper.cpp \
+        --subst-var hwclock "${utillinux}/sbin/hwclock"
+
+    sed '1i#include <cmath>' -i kcms/touchpad/src/backends/x11/synapticstouchpad.cpp
+  '';
+  NIX_CFLAGS_COMPILE = [ "-I${xorgserver.dev}/include/xorg" ];
+  cmakeFlags = [
+    "-DEvdev_INCLUDE_DIRS=${xf86inputevdev.dev}/include/xorg"
+    "-DSynaptics_INCLUDE_DIRS=${xf86inputsynaptics.dev}/include/xorg"
+  ];
+  postInstall = ''
+    # Display ~/Desktop contents on the desktop by default.
+    sed -i "$out/share/plasma/shells/org.kde.plasma.desktop/contents/defaults" \
+        -e 's/Containment=org.kde.desktopcontainment/Containment=org.kde.plasma.folder/'
+  '';
+}
diff --git a/pkgs/desktops/plasma-5/plasma-desktop/hwclock-path.patch b/pkgs/desktops/plasma-5/plasma-desktop/hwclock-path.patch
new file mode 100644
index 000000000000..5623de84668f
--- /dev/null
+++ b/pkgs/desktops/plasma-5/plasma-desktop/hwclock-path.patch
@@ -0,0 +1,24 @@
+Index: plasma-desktop-5.8.5/kcms/dateandtime/helper.cpp
+===================================================================
+--- plasma-desktop-5.8.5.orig/kcms/dateandtime/helper.cpp
++++ plasma-desktop-5.8.5/kcms/dateandtime/helper.cpp
+@@ -48,10 +48,6 @@
+ #include <sys/stat.h>
+ #endif
+ 
+-// We cannot rely on the $PATH environment variable, because D-Bus activation
+-// clears it. So we have to use a reasonable default.
+-static const QString exePath = QStringLiteral("/usr/sbin:/usr/bin:/sbin:/bin");
+-
+ int ClockHelper::ntp( const QStringList& ntpServers, bool ntpEnabled )
+ {
+     int ret = 0;
+@@ -227,7 +223,7 @@ int ClockHelper::tzreset()
+ 
+ void ClockHelper::toHwclock()
+ {
+-    QString hwclock = KStandardDirs::findExe(QStringLiteral("hwclock"), exePath);
++    QString hwclock = "@hwclock@";
+     if (!hwclock.isEmpty()) {
+         KProcess::execute(hwclock, QStringList() << QStringLiteral("--systohc"));
+     }
diff --git a/pkgs/desktops/plasma-5/plasma-desktop/ibus.patch b/pkgs/desktops/plasma-5/plasma-desktop/ibus.patch
new file mode 100644
index 000000000000..d5ac4b250875
--- /dev/null
+++ b/pkgs/desktops/plasma-5/plasma-desktop/ibus.patch
@@ -0,0 +1,26 @@
+Index: plasma-desktop-5.8.5/kcms/keyboard/xkb_helper.cpp
+===================================================================
+--- plasma-desktop-5.8.5.orig/kcms/keyboard/xkb_helper.cpp
++++ plasma-desktop-5.8.5/kcms/keyboard/xkb_helper.cpp
+@@ -185,21 +185,5 @@ bool XkbHelper::initializeKeyboardLayout
+ 
+ bool XkbHelper::preInitialize()
+ {
+-    // stop ibus so it does not mess with our layouts, we can remove this when we integrate IM into keyboard module
+-
+-    QString ibusExe = QStandardPaths::findExecutable(QStringLiteral("ibus"));
+-    if( ibusExe.isEmpty() ) {
+-        return 0;
+-    }
+-
+-    KProcess ibusProcess;
+-    ibusProcess << ibusExe << QStringLiteral("exit");
+-    ibusProcess.setOutputChannelMode(KProcess::SeparateChannels);
+-    int res = ibusProcess.execute();
+-
+-    if( res == 0 ) {
+-        qCWarning(KCM_KEYBOARD) << "ibus successfully stopped";
+-    }
+-
+     return 0;
+ }
diff --git a/pkgs/desktops/plasma-5/plasma-desktop/qml-import-paths.patch b/pkgs/desktops/plasma-5/plasma-desktop/qml-import-paths.patch
new file mode 100644
index 000000000000..def5b577b972
--- /dev/null
+++ b/pkgs/desktops/plasma-5/plasma-desktop/qml-import-paths.patch
@@ -0,0 +1,54 @@
+Index: plasma-desktop-5.8.5/applets/pager/package/contents/ui/main.qml
+===================================================================
+--- plasma-desktop-5.8.5.orig/applets/pager/package/contents/ui/main.qml
++++ plasma-desktop-5.8.5/applets/pager/package/contents/ui/main.qml
+@@ -25,7 +25,7 @@ import org.kde.plasma.components 2.0 as
+ import org.kde.kquickcontrolsaddons 2.0 as KQuickControlsAddonsComponents
+ import org.kde.draganddrop 2.0
+ import org.kde.plasma.private.pager 2.0
+-import "utils.js" as Utils
++import "../code/utils.js" as Utils
+ 
+ MouseArea {
+     id: root
+Index: plasma-desktop-5.8.5/containments/desktop/package/contents/ui/FolderView.qml
+===================================================================
+--- plasma-desktop-5.8.5.orig/containments/desktop/package/contents/ui/FolderView.qml
++++ plasma-desktop-5.8.5/containments/desktop/package/contents/ui/FolderView.qml
+@@ -27,7 +27,7 @@ import org.kde.plasma.extras 2.0 as Plas
+ import org.kde.kquickcontrolsaddons 2.0
+ 
+ import org.kde.private.desktopcontainment.folder 0.1 as Folder
+-import "FolderTools.js" as FolderTools
++import "../code/FolderTools.js" as FolderTools
+ 
+ Item {
+     id: main
+Index: plasma-desktop-5.8.5/containments/desktop/package/contents/ui/main.qml
+===================================================================
+--- plasma-desktop-5.8.5.orig/containments/desktop/package/contents/ui/main.qml
++++ plasma-desktop-5.8.5/containments/desktop/package/contents/ui/main.qml
+@@ -30,8 +30,8 @@ import org.kde.kquickcontrolsaddons 2.0
+ 
+ import org.kde.private.desktopcontainment.desktop 0.1 as Desktop
+ 
+-import "LayoutManager.js" as LayoutManager
+-import "FolderTools.js" as FolderTools
++import "../code/LayoutManager.js" as LayoutManager
++import "../code/FolderTools.js" as FolderTools
+ 
+ DragDrop.DropArea {
+     id: root
+Index: plasma-desktop-5.8.5/containments/panel/contents/ui/main.qml
+===================================================================
+--- plasma-desktop-5.8.5.orig/containments/panel/contents/ui/main.qml
++++ plasma-desktop-5.8.5/containments/panel/contents/ui/main.qml
+@@ -25,7 +25,7 @@ import org.kde.plasma.components 2.0 as
+ import org.kde.kquickcontrolsaddons 2.0
+ import org.kde.draganddrop 2.0 as DragDrop
+ 
+-import "LayoutManager.js" as LayoutManager
++import "../code/LayoutManager.js" as LayoutManager
+ 
+ DragDrop.DropArea {
+     id: root
diff --git a/pkgs/desktops/plasma-5/plasma-desktop/series b/pkgs/desktops/plasma-5/plasma-desktop/series
new file mode 100644
index 000000000000..36778cd1c560
--- /dev/null
+++ b/pkgs/desktops/plasma-5/plasma-desktop/series
@@ -0,0 +1,4 @@
+qml-import-paths.patch
+hwclock-path.patch
+tzdir.patch
+ibus.patch
diff --git a/pkgs/desktops/plasma-5/plasma-desktop/tzdir.patch b/pkgs/desktops/plasma-5/plasma-desktop/tzdir.patch
new file mode 100644
index 000000000000..97504b330fed
--- /dev/null
+++ b/pkgs/desktops/plasma-5/plasma-desktop/tzdir.patch
@@ -0,0 +1,18 @@
+Index: plasma-desktop-5.8.5/kcms/dateandtime/helper.cpp
+===================================================================
+--- plasma-desktop-5.8.5.orig/kcms/dateandtime/helper.cpp
++++ plasma-desktop-5.8.5/kcms/dateandtime/helper.cpp
+@@ -181,7 +181,12 @@ int ClockHelper::tz( const QString& sele
+ 
+     val = selectedzone;
+ #else
+-    QString tz = "/usr/share/zoneinfo/" + selectedzone;
++    QString tzdir = QString::fromLocal8Bit(qgetenv("TZDIR"));
++    QString tz = tzdir + "/" + selectedzone;
++    if (tzdir.isEmpty()) {
++      // Standard Linux path
++      tz = "/usr/share/zoneinfo/" + selectedzone;
++    }
+ 
+     if (QFile::exists(tz)) { // make sure the new TZ really exists
+         QFile::remove(QStringLiteral("/etc/localtime"));