about summary refs log tree commit diff
path: root/pkgs/desktops/kde-5/plasma-5.5
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/desktops/kde-5/plasma-5.5')
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/bluedevil.nix26
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/breeze-gtk.nix8
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/breeze-qt4.nix29
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/breeze-qt5.nix23
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/default.nix87
-rwxr-xr-xpkgs/desktops/kde-5/plasma-5.5/fetchsrcs.sh57
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/kde-cli-tools.nix27
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/kde-gtk-config/0001-follow-symlinks.patch39
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/kde-gtk-config/default.nix28
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/kdecoration.nix6
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/kdeplasma-addons.nix21
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/kgamma5.nix9
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/khelpcenter.nix20
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/khotkeys.nix16
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/kinfocenter.nix24
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/kmenuedit.nix19
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/kscreen.nix29
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/kscreenlocker.nix19
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/ksshaskpass.nix13
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/ksysguard.nix20
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/kwayland.nix14
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/kwin/0001-qdiriterator-follow-symlinks.patch25
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/kwin/default.nix33
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/kwrited.nix10
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/libkscreen/default.nix18
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/libksysguard/0001-qdiriterator-follow-symlinks.patch25
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/libksysguard/default.nix21
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/milou.nix17
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/oxygen.nix20
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/plasma-desktop/0001-qt-5.5-QML-import-paths.patch67
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/plasma-desktop/0002-hwclock.patch36
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/plasma-desktop/0003-tzdir.patch30
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/plasma-desktop/default.nix86
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/plasma-mediacenter.nix20
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/plasma-nm/0001-mobile-broadband-provider-info-path.patch25
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/plasma-nm/default.nix36
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/plasma-pa.nix18
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/plasma-workspace-wallpapers.nix10
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/plasma-workspace/default.nix84
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/plasma-workspace/qml-import-path.patch104
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/plasma-workspace/series2
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/plasma-workspace/startkde.patch375
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/polkit-kde-agent.nix31
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/powerdevil.nix20
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/srcs.nix309
-rw-r--r--pkgs/desktops/kde-5/plasma-5.5/systemsettings.nix21
46 files changed, 1977 insertions, 0 deletions
diff --git a/pkgs/desktops/kde-5/plasma-5.5/bluedevil.nix b/pkgs/desktops/kde-5/plasma-5.5/bluedevil.nix
new file mode 100644
index 000000000000..6596c246202f
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/bluedevil.nix
@@ -0,0 +1,26 @@
+{ plasmaPackage, extra-cmake-modules, bluez-qt, kcoreaddons
+, kdbusaddons, kded, ki18n, kiconthemes, kio, knotifications
+, kwidgetsaddons, kwindowsystem, makeQtWrapper, plasma-framework
+, qtdeclarative, shared_mime_info
+}:
+
+plasmaPackage {
+  name = "bluedevil";
+  nativeBuildInputs = [
+    extra-cmake-modules makeQtWrapper shared_mime_info
+  ];
+  buildInputs = [
+    kcoreaddons kdbusaddons kded kiconthemes knotifications
+    kwidgetsaddons
+  ];
+  propagatedBuildInputs = [
+    bluez-qt ki18n kio kwindowsystem plasma-framework qtdeclarative
+  ];
+  propagatedUserEnvPkgs = [ bluez-qt ];
+  postInstall = ''
+    wrapQtProgram "$out/bin/bluedevil-wizard"
+    wrapQtProgram "$out/bin/bluedevil-sendfile"
+    # Fix the location of logic.js for the plasmoid
+    ln -s $out/share/plasma/plasmoids/org.kde.plasma.bluetooth/contents/code/logic.js $out/share/plasma/plasmoids/org.kde.plasma.bluetooth/contents/ui/logic.js
+  '';
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/breeze-gtk.nix b/pkgs/desktops/kde-5/plasma-5.5/breeze-gtk.nix
new file mode 100644
index 000000000000..179f15dc8763
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/breeze-gtk.nix
@@ -0,0 +1,8 @@
+{ plasmaPackage
+, extra-cmake-modules
+}:
+
+plasmaPackage {
+  name = "breeze-gtk";
+  nativeBuildInputs = [ extra-cmake-modules ];
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/breeze-qt4.nix b/pkgs/desktops/kde-5/plasma-5.5/breeze-qt4.nix
new file mode 100644
index 000000000000..f8092bc9d376
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/breeze-qt4.nix
@@ -0,0 +1,29 @@
+{ plasmaPackage
+, automoc4
+, cmake
+, perl
+, pkgconfig
+, kdelibs
+, qt4
+, xproto
+}:
+
+plasmaPackage {
+  name = "breeze-qt4";
+  sname = "breeze";
+  buildInputs = [
+    kdelibs
+    qt4
+    xproto
+  ];
+  nativeBuildInputs = [
+    automoc4
+    cmake
+    perl
+    pkgconfig
+  ];
+  cmakeFlags = [
+    "-DUSE_KDE4=ON"
+    "-DQT_QMAKE_EXECUTABLE=${qt4}/bin/qmake"
+  ];
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/breeze-qt5.nix b/pkgs/desktops/kde-5/plasma-5.5/breeze-qt5.nix
new file mode 100644
index 000000000000..63ade168805d
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/breeze-qt5.nix
@@ -0,0 +1,23 @@
+{ plasmaPackage, extra-cmake-modules, frameworkintegration
+, kcmutils, kconfigwidgets, kcoreaddons, kdecoration, kguiaddons
+, ki18n, kwindowsystem, makeQtWrapper, plasma-framework, qtx11extras
+}:
+
+plasmaPackage {
+  name = "breeze-qt5";
+  sname = "breeze";
+  nativeBuildInputs = [
+    extra-cmake-modules
+    makeQtWrapper
+  ];
+  buildInputs = [
+    kcmutils kconfigwidgets kcoreaddons kdecoration kguiaddons
+  ];
+  propagatedBuildInputs = [
+    frameworkintegration ki18n kwindowsystem plasma-framework qtx11extras
+  ];
+  cmakeFlags = [ "-DUSE_Qt4=OFF" ];
+  postInstall = ''
+    wrapQtProgram "$out/bin/breeze-settings5"
+  '';
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/default.nix b/pkgs/desktops/kde-5/plasma-5.5/default.nix
new file mode 100644
index 000000000000..384fa6f6d272
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/default.nix
@@ -0,0 +1,87 @@
+# Maintainer's Notes:
+#
+# How To Update
+#  1. Edit the URL in ./manifest.sh
+#  2. Run ./manifest.sh
+#  3. Fix build errors.
+
+{ pkgs, debug ? false }:
+
+let
+
+  inherit (pkgs) lib stdenv symlinkJoin;
+
+  kdeApps = pkgs.kdeApps_15_12;
+
+  srcs = import ./srcs.nix { inherit (pkgs) fetchurl; inherit mirror; };
+  mirror = "mirror://kde";
+
+  packages = self: with self; {
+    plasmaPackage = args:
+      let
+        inherit (args) name;
+        sname = args.sname or name;
+        inherit (srcs."${sname}") src version;
+      in stdenv.mkDerivation (args // {
+        name = "${name}-${version}";
+        inherit src;
+
+        outputs = args.outputs or [ "dev" "out" ];
+
+        cmakeFlags =
+          (args.cmakeFlags or [])
+          ++ [ "-DBUILD_TESTING=OFF" ]
+          ++ lib.optional debug "-DCMAKE_BUILD_TYPE=Debug";
+
+        meta = {
+          license = with lib.licenses; [
+            lgpl21Plus lgpl3Plus bsd2 mit gpl2Plus gpl3Plus fdl12
+          ];
+          platforms = lib.platforms.linux;
+          maintainers = with lib.maintainers; [ ttuegel ];
+          homepage = "http://www.kde.org";
+        } // (args.meta or {});
+      });
+
+    bluedevil = callPackage ./bluedevil.nix {};
+    breeze-gtk = callPackage ./breeze-gtk.nix {};
+    breeze-qt4 = callPackage ./breeze-qt4.nix {};
+    breeze-qt5 = callPackage ./breeze-qt5.nix {};
+    breeze =
+      let
+        version = (builtins.parseDrvName breeze-qt5.name).version;
+      in
+        symlinkJoin "breeze-${version}"
+        (map (pkg: pkg.out or pkg) [ breeze-gtk breeze-qt4 breeze-qt5 ]);
+    kde-cli-tools = callPackage ./kde-cli-tools.nix {};
+    kde-gtk-config = callPackage ./kde-gtk-config {};
+    kdecoration = callPackage ./kdecoration.nix {};
+    kdeplasma-addons = callPackage ./kdeplasma-addons.nix {};
+    kgamma5 = callPackage ./kgamma5.nix {};
+    khelpcenter = callPackage ./khelpcenter.nix {};
+    khotkeys = callPackage ./khotkeys.nix {};
+    kinfocenter = callPackage ./kinfocenter.nix {};
+    kmenuedit = callPackage ./kmenuedit.nix {};
+    kscreen = callPackage ./kscreen.nix {};
+    kscreenlocker = callPackage ./kscreenlocker.nix {};
+    ksshaskpass = callPackage ./ksshaskpass.nix {};
+    ksysguard = callPackage ./ksysguard.nix {};
+    kwayland = callPackage ./kwayland.nix {};
+    kwin = callPackage ./kwin {};
+    kwrited = callPackage ./kwrited.nix {};
+    libkscreen = callPackage ./libkscreen {};
+    libksysguard = callPackage ./libksysguard {};
+    milou = callPackage ./milou.nix {};
+    oxygen = callPackage ./oxygen.nix {};
+    plasma-desktop = callPackage ./plasma-desktop {};
+    plasma-mediacenter = callPackage ./plasma-mediacenter.nix {};
+    plasma-nm = callPackage ./plasma-nm {};
+    plasma-pa = callPackage ./plasma-pa.nix {};
+    plasma-workspace = callPackage ./plasma-workspace {};
+    plasma-workspace-wallpapers = callPackage ./plasma-workspace-wallpapers.nix {};
+    polkit-kde-agent = callPackage ./polkit-kde-agent.nix {};
+    powerdevil = callPackage ./powerdevil.nix {};
+    systemsettings = callPackage ./systemsettings.nix {};
+  };
+
+in packages
diff --git a/pkgs/desktops/kde-5/plasma-5.5/fetchsrcs.sh b/pkgs/desktops/kde-5/plasma-5.5/fetchsrcs.sh
new file mode 100755
index 000000000000..714e0fc75097
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/fetchsrcs.sh
@@ -0,0 +1,57 @@
+#! /usr/bin/env nix-shell
+#! nix-shell -i bash -p coreutils findutils gawk gnused nix wget
+
+set -x
+
+# The trailing slash at the end is necessary!
+RELEASE_URL="http://download.kde.org/stable/plasma/5.5.4/"
+EXTRA_WGET_ARGS='-A *.tar.xz'
+
+mkdir tmp; cd tmp
+
+rm -f ../srcs.csv
+
+wget -nH -r -c --no-parent $RELEASE_URL $EXTRA_WGET_ARGS
+
+find . | while read src; do
+    if [[ -f "${src}" ]]; then
+        # Sanitize file name
+        filename=$(basename "$src" | tr '@' '_')
+        nameVersion="${filename%.tar.*}"
+        name=$(echo "$nameVersion" | sed -e 's,-[[:digit:]].*,,' | sed -e 's,-opensource-src$,,')
+        version=$(echo "$nameVersion" | sed -e 's,^\([[:alpha:]][[:alnum:]]*-\)\+,,')
+        echo "$name,$version,$src,$filename" >>../srcs.csv
+    fi
+done
+
+cat >../srcs.nix <<EOF
+# DO NOT EDIT! This file is generated automatically by fetchsrcs.sh
+{ fetchurl, mirror }:
+
+{
+EOF
+
+gawk -F , "{ print \$1 }" ../srcs.csv | sort | uniq | while read name; do
+    versions=$(gawk -F , "/^$name,/ { print \$2 }" ../srcs.csv)
+    latestVersion=$(echo "$versions" | sort -rV | head -n 1)
+    src=$(gawk -F , "/^$name,$latestVersion,/ { print \$3 }" ../srcs.csv)
+    filename=$(gawk -F , "/^$name,$latestVersion,/ { print \$4 }" ../srcs.csv)
+    url="${src:2}"
+    sha256=$(nix-hash --type sha256 --base32 --flat "$src")
+    cat >>../srcs.nix <<EOF
+  $name = {
+    version = "$latestVersion";
+    src = fetchurl {
+      url = "\${mirror}/$url";
+      sha256 = "$sha256";
+      name = "$filename";
+    };
+  };
+EOF
+done
+
+echo "}" >>../srcs.nix
+
+rm -f ../srcs.csv
+
+cd ..
diff --git a/pkgs/desktops/kde-5/plasma-5.5/kde-cli-tools.nix b/pkgs/desktops/kde-5/plasma-5.5/kde-cli-tools.nix
new file mode 100644
index 000000000000..7f19af6959ec
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/kde-cli-tools.nix
@@ -0,0 +1,27 @@
+{ plasmaPackage, extra-cmake-modules, kcmutils, kconfig
+, kdelibs4support, kdesu, kdoctools, ki18n, kiconthemes
+, kwindowsystem, makeQtWrapper, qtsvg, qtx11extras
+}:
+
+plasmaPackage {
+  name = "kde-cli-tools";
+  nativeBuildInputs = [ extra-cmake-modules kdoctools makeQtWrapper ];
+  buildInputs = [
+    kcmutils kconfig kdesu kiconthemes
+  ];
+  propagatedBuildInputs = [
+    kdelibs4support ki18n kwindowsystem qtsvg qtx11extras
+  ];
+  postInstall = ''
+    wrapQtProgram "$out/bin/kmimetypefinder5"
+    wrapQtProgram "$out/bin/ksvgtopng5"
+    wrapQtProgram "$out/bin/ktraderclient5"
+    wrapQtProgram "$out/bin/kioclient5"
+    wrapQtProgram "$out/bin/kdecp5"
+    wrapQtProgram "$out/bin/keditfiletype5"
+    wrapQtProgram "$out/bin/kcmshell5"
+    wrapQtProgram "$out/bin/kdemv5"
+    wrapQtProgram "$out/bin/kstart5"
+    wrapQtProgram "$out/bin/kde-open5"
+  '';
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/kde-gtk-config/0001-follow-symlinks.patch b/pkgs/desktops/kde-5/plasma-5.5/kde-gtk-config/0001-follow-symlinks.patch
new file mode 100644
index 000000000000..759eda4cc134
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/kde-gtk-config/0001-follow-symlinks.patch
@@ -0,0 +1,39 @@
+From 33b25c2e3c7a002c7f726cd79fc4bab22b1299be Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@gmail.com>
+Date: Tue, 27 Oct 2015 18:07:54 -0500
+Subject: [PATCH] follow symlinks
+
+---
+ src/appearancegtk2.cpp  | 2 +-
+ src/iconthemesmodel.cpp | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/appearancegtk2.cpp b/src/appearancegtk2.cpp
+index b1e0b52..095cddc 100644
+--- a/src/appearancegtk2.cpp
++++ b/src/appearancegtk2.cpp
+@@ -73,7 +73,7 @@ QString AppearanceGTK2::themesGtkrcFile(const QString& themeName) const
+     QStringList themes=installedThemes();
+     themes=themes.filter(QRegExp("/"+themeName+"/?$"));
+     if(themes.size()==1) {
+-        QDirIterator it(themes.first(), QDirIterator::Subdirectories);
++        QDirIterator it(themes.first(), QDirIterator::Subdirectories | QDirIterator::FollowSymlinks);
+         while(it.hasNext()) {
+             it.next();
+             if(it.fileName()=="gtkrc") {
+diff --git a/src/iconthemesmodel.cpp b/src/iconthemesmodel.cpp
+index 07c7ad7..b04d978 100644
+--- a/src/iconthemesmodel.cpp
++++ b/src/iconthemesmodel.cpp
+@@ -46,7 +46,7 @@ QList<QDir> IconThemesModel::installedThemesPaths()
+     
+     foreach(const QString& dir, dirs) {
+         QDir userIconsDir(dir);
+-        QDirIterator it(userIconsDir.path(), QDir::NoDotAndDotDot|QDir::AllDirs|QDir::NoSymLinks);
++        QDirIterator it(userIconsDir.path(), QDir::NoDotAndDotDot|QDir::AllDirs);
+         while(it.hasNext()) {
+             QString currentPath = it.next();
+             QDir dir(currentPath);
+-- 
+2.6.2
+
diff --git a/pkgs/desktops/kde-5/plasma-5.5/kde-gtk-config/default.nix b/pkgs/desktops/kde-5/plasma-5.5/kde-gtk-config/default.nix
new file mode 100644
index 000000000000..ab8867520b38
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/kde-gtk-config/default.nix
@@ -0,0 +1,28 @@
+{ plasmaPackage
+, extra-cmake-modules
+, glib
+, gtk2
+, gtk3
+, karchive
+, kcmutils
+, kconfigwidgets
+, ki18n
+, kiconthemes
+, kio
+, knewstuff
+}:
+
+plasmaPackage {
+  name = "kde-gtk-config";
+  patches = [ ./0001-follow-symlinks.patch ];
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [
+    glib gtk2 gtk3 karchive kcmutils kconfigwidgets kiconthemes
+    knewstuff
+  ];
+  propagatedBuildInputs = [ ki18n kio ];
+  cmakeFlags = [
+    "-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include"
+    "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include"
+  ];
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/kdecoration.nix b/pkgs/desktops/kde-5/plasma-5.5/kdecoration.nix
new file mode 100644
index 000000000000..eb65f7f90afb
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/kdecoration.nix
@@ -0,0 +1,6 @@
+{ plasmaPackage, extra-cmake-modules }:
+
+plasmaPackage {
+  name = "kdecoration";
+  nativeBuildInputs = [ extra-cmake-modules ];
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/kdeplasma-addons.nix b/pkgs/desktops/kde-5/plasma-5.5/kdeplasma-addons.nix
new file mode 100644
index 000000000000..d6a96a3276d7
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/kdeplasma-addons.nix
@@ -0,0 +1,21 @@
+{ plasmaPackage, extra-cmake-modules, kdoctools, ibus, kconfig
+, kconfigwidgets, kcoreaddons, kcmutils, kdelibs4support, ki18n
+, kio, knewstuff, kross, krunner, kservice, kunitconversion
+, plasma-framework, qtdeclarative, qtx11extras
+}:
+
+plasmaPackage {
+  name = "kdeplasma-addons";
+  nativeBuildInputs = [
+    extra-cmake-modules
+    kdoctools
+  ];
+  buildInputs = [
+    ibus kconfig kconfigwidgets kcoreaddons kcmutils
+    knewstuff kservice kunitconversion
+  ];
+  propagatedBuildInputs = [
+    kdelibs4support kio kross krunner plasma-framework qtdeclarative
+    qtx11extras
+  ];
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/kgamma5.nix b/pkgs/desktops/kde-5/plasma-5.5/kgamma5.nix
new file mode 100644
index 000000000000..965c33e6eef8
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/kgamma5.nix
@@ -0,0 +1,9 @@
+{ plasmaPackage, extra-cmake-modules, kdoctools, kdelibs4support
+, qtx11extras
+}:
+
+plasmaPackage {
+  name = "kgamma5";
+  nativeBuildInputs = [ extra-cmake-modules kdoctools ];
+  propagatedBuildInputs = [ kdelibs4support qtx11extras ];
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/khelpcenter.nix b/pkgs/desktops/kde-5/plasma-5.5/khelpcenter.nix
new file mode 100644
index 000000000000..6ba860b9dfb2
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/khelpcenter.nix
@@ -0,0 +1,20 @@
+{ plasmaPackage, extra-cmake-modules, kdoctools, kconfig
+, kcoreaddons, kdbusaddons, ki18n, kinit, kcmutils, kdelibs4support
+, khtml, kservice, makeQtWrapper
+}:
+
+plasmaPackage {
+  name = "khelpcenter";
+  nativeBuildInputs = [
+    extra-cmake-modules
+    kdoctools
+    makeQtWrapper
+  ];
+  buildInputs = [
+    kconfig kcoreaddons kdbusaddons kinit kcmutils kservice
+  ];
+  propagatedBuildInputs = [ kdelibs4support khtml ki18n ];
+  postInstall = ''
+    wrapQtProgram "$out/bin/khelpcenter"
+  '';
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/khotkeys.nix b/pkgs/desktops/kde-5/plasma-5.5/khotkeys.nix
new file mode 100644
index 000000000000..141320e6b3e6
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/khotkeys.nix
@@ -0,0 +1,16 @@
+{ plasmaPackage, extra-cmake-modules, kdoctools, kcmutils
+, kdbusaddons, kdelibs4support, kglobalaccel, ki18n, kio, kxmlgui
+, plasma-framework, plasma-workspace, qtx11extras
+}:
+
+plasmaPackage {
+  name = "khotkeys";
+  nativeBuildInputs = [ extra-cmake-modules kdoctools ];
+  buildInputs = [
+    kcmutils kdbusaddons kxmlgui
+  ];
+  propagatedBuildInputs = [
+    kdelibs4support kglobalaccel ki18n kio plasma-framework
+    plasma-workspace qtx11extras
+  ];
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/kinfocenter.nix b/pkgs/desktops/kde-5/plasma-5.5/kinfocenter.nix
new file mode 100644
index 000000000000..ed717790cd0d
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/kinfocenter.nix
@@ -0,0 +1,24 @@
+{ plasmaPackage, extra-cmake-modules, kdoctools, kcmutils
+, kcompletion, kconfig, kconfigwidgets, kcoreaddons, kdbusaddons
+, kdeclarative, kdelibs4support, ki18n, kiconthemes, kio, kpackage
+, kservice, kwidgetsaddons, kxmlgui, libraw1394, makeQtWrapper
+, pciutils, solid
+}:
+
+plasmaPackage {
+  name = "kinfocenter";
+  nativeBuildInputs = [
+    extra-cmake-modules
+    kdoctools
+    makeQtWrapper
+  ];
+  buildInputs = [
+    kcmutils kcompletion kconfig kconfigwidgets kcoreaddons
+    kdbusaddons kiconthemes kpackage kservice kwidgetsaddons
+    kxmlgui libraw1394 pciutils solid
+  ];
+  propagatedBuildInputs = [ kdeclarative kdelibs4support ki18n kio ];
+  postInstall = ''
+    wrapQtProgram "$out/bin/kinfocenter"
+  '';
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/kmenuedit.nix b/pkgs/desktops/kde-5/plasma-5.5/kmenuedit.nix
new file mode 100644
index 000000000000..3834ca1328f8
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/kmenuedit.nix
@@ -0,0 +1,19 @@
+{ plasmaPackage, extra-cmake-modules, kdoctools, ki18n, kxmlgui
+, kdbusaddons, kiconthemes, kio, sonnet, kdelibs4support, makeQtWrapper
+}:
+
+plasmaPackage {
+  name = "kmenuedit";
+  nativeBuildInputs = [
+    extra-cmake-modules
+    kdoctools
+    makeQtWrapper
+  ];
+  buildInputs = [
+    kxmlgui kdbusaddons kiconthemes
+  ];
+  propagatedBuildInputs = [ kdelibs4support ki18n kio sonnet ];
+  postInstall = ''
+    wrapQtProgram "$out/bin/kmenuedit"
+  '';
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/kscreen.nix b/pkgs/desktops/kde-5/plasma-5.5/kscreen.nix
new file mode 100644
index 000000000000..a521a7993628
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/kscreen.nix
@@ -0,0 +1,29 @@
+{ plasmaPackage, extra-cmake-modules, kconfig, kconfigwidgets
+, kdbusaddons, kglobalaccel, ki18n, kwidgetsaddons, kxmlgui
+, libkscreen, makeQtWrapper, qtdeclarative, qtgraphicaleffects
+}:
+
+plasmaPackage {
+  name = "kscreen";
+  nativeBuildInputs = [
+    extra-cmake-modules
+    makeQtWrapper
+  ];
+  buildInputs = [
+    kconfig
+    kconfigwidgets
+    kdbusaddons
+    kwidgetsaddons
+    kxmlgui
+  ];
+  propagatedBuildInputs = [
+    kglobalaccel
+    ki18n
+    libkscreen
+    qtdeclarative
+    qtgraphicaleffects
+  ];
+  postInstall = ''
+    wrapQtProgram "$out/bin/kscreen-console"
+  '';
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/kscreenlocker.nix b/pkgs/desktops/kde-5/plasma-5.5/kscreenlocker.nix
new file mode 100644
index 000000000000..562797b546e9
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/kscreenlocker.nix
@@ -0,0 +1,19 @@
+{ plasmaPackage, extra-cmake-modules, kcmutils, kcrash, kdeclarative
+, kdelibs4support, kdoctools, kglobalaccel, kidletime, kwayland
+, libXcursor, pam, plasma-framework, qtdeclarative, wayland
+}:
+
+plasmaPackage {
+  name = "kscreenlocker";
+  nativeBuildInputs = [
+    extra-cmake-modules
+    kdoctools
+  ];
+  buildInputs = [
+    kcmutils kcrash kdelibs4support kglobalaccel kidletime kwayland
+    libXcursor pam wayland
+  ];
+  propagatedBuildInputs = [
+    kdeclarative plasma-framework qtdeclarative
+  ];
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/ksshaskpass.nix b/pkgs/desktops/kde-5/plasma-5.5/ksshaskpass.nix
new file mode 100644
index 000000000000..f274512e027a
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/ksshaskpass.nix
@@ -0,0 +1,13 @@
+{ plasmaPackage, extra-cmake-modules, kdoctools, kcoreaddons
+, ki18n, kwallet, kwidgetsaddons, makeQtWrapper
+}:
+
+plasmaPackage {
+  name = "ksshaskpass";
+  nativeBuildInputs = [ extra-cmake-modules kdoctools makeQtWrapper ];
+  buildInputs = [ kcoreaddons kwallet kwidgetsaddons ];
+  propagatedBuildInputs = [ ki18n ];
+  postInstall = ''
+    wrapQtProgram "$out/bin/ksshaskpass"
+  '';
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/ksysguard.nix b/pkgs/desktops/kde-5/plasma-5.5/ksysguard.nix
new file mode 100644
index 000000000000..d47f9215a41a
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/ksysguard.nix
@@ -0,0 +1,20 @@
+{ plasmaPackage, extra-cmake-modules, kdoctools, kconfig
+, kcoreaddons, kdelibs4support, ki18n, kitemviews, knewstuff
+, kiconthemes, libksysguard, makeQtWrapper
+}:
+
+plasmaPackage {
+  name = "ksysguard";
+  nativeBuildInputs = [
+    extra-cmake-modules
+    kdoctools
+    makeQtWrapper
+  ];
+  buildInputs = [
+    kconfig kcoreaddons kitemviews knewstuff kiconthemes libksysguard
+  ];
+  propagatedBuildInputs = [ kdelibs4support ki18n ];
+  postInstall = ''
+    wrapQtProgram "$out/bin/ksysguardd"
+  '';
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/kwayland.nix b/pkgs/desktops/kde-5/plasma-5.5/kwayland.nix
new file mode 100644
index 000000000000..e4d6eb631f95
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/kwayland.nix
@@ -0,0 +1,14 @@
+{ plasmaPackage
+, extra-cmake-modules
+, wayland
+}:
+
+plasmaPackage {
+  name = "kwayland";
+  nativeBuildInputs = [
+    extra-cmake-modules
+  ];
+  buildInputs = [
+    wayland
+  ];
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/kwin/0001-qdiriterator-follow-symlinks.patch b/pkgs/desktops/kde-5/plasma-5.5/kwin/0001-qdiriterator-follow-symlinks.patch
new file mode 100644
index 000000000000..797a32fc5f83
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/kwin/0001-qdiriterator-follow-symlinks.patch
@@ -0,0 +1,25 @@
+From 78a4b554187c18fd86b62089f7730c4273fadd4c Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@gmail.com>
+Date: Wed, 14 Oct 2015 07:05:22 -0500
+Subject: [PATCH] qdiriterator follow symlinks
+
+---
+ clients/aurorae/src/aurorae.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/clients/aurorae/src/aurorae.cpp b/clients/aurorae/src/aurorae.cpp
+index 781c960..ad5f420 100644
+--- a/clients/aurorae/src/aurorae.cpp
++++ b/clients/aurorae/src/aurorae.cpp
+@@ -211,7 +211,7 @@ void Helper::init()
+     // so let's try to locate our plugin:
+     QString pluginPath;
+     for (const QString &path : m_engine->importPathList()) {
+-        QDirIterator it(path, QDirIterator::Subdirectories);
++        QDirIterator it(path, QDirIterator::Subdirectories | QDirIterator::FollowSymlinks);
+         while (it.hasNext()) {
+             it.next();
+             QFileInfo fileInfo = it.fileInfo();
+-- 
+2.5.2
+
diff --git a/pkgs/desktops/kde-5/plasma-5.5/kwin/default.nix b/pkgs/desktops/kde-5/plasma-5.5/kwin/default.nix
new file mode 100644
index 000000000000..2e86068b486f
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/kwin/default.nix
@@ -0,0 +1,33 @@
+{ plasmaPackage, extra-cmake-modules, kdoctools, epoxy
+, kactivities, kcompletion, kcmutils, kconfig, kconfigwidgets
+, kcoreaddons, kcrash, kdeclarative, kdecoration, kglobalaccel
+, ki18n, kiconthemes, kidletime, kinit, kio, knewstuff, knotifications
+, kpackage, kscreenlocker, kservice, kwayland, kwidgetsaddons, kwindowsystem
+, kxmlgui, libinput, libICE, libSM, plasma-framework, qtdeclarative
+, qtmultimedia, qtscript, qtx11extras, udev, wayland, xcb-util-cursor
+, makeQtWrapper
+}:
+
+plasmaPackage {
+  name = "kwin";
+  nativeBuildInputs = [
+    extra-cmake-modules
+    kdoctools
+    makeQtWrapper
+  ];
+  buildInputs = [
+    epoxy kcompletion kcmutils kconfig kconfigwidgets kcoreaddons
+    kcrash kdecoration kiconthemes kidletime kinit knewstuff knotifications
+    kpackage kservice kwayland kwidgetsaddons kxmlgui libinput libICE
+    libSM qtscript udev wayland xcb-util-cursor
+  ];
+  propagatedBuildInputs = [
+    kactivities kdeclarative kglobalaccel ki18n kio kscreenlocker
+    kwindowsystem plasma-framework qtdeclarative qtmultimedia qtx11extras
+  ];
+  patches = [ ./0001-qdiriterator-follow-symlinks.patch ];
+  postInstall = ''
+    wrapQtProgram "$out/bin/kwin_x11"
+    wrapQtProgram "$out/bin/kwin_wayland"
+  '';
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/kwrited.nix b/pkgs/desktops/kde-5/plasma-5.5/kwrited.nix
new file mode 100644
index 000000000000..a6ed9d9bb287
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/kwrited.nix
@@ -0,0 +1,10 @@
+{ plasmaPackage, extra-cmake-modules, kcoreaddons, ki18n, kpty
+, knotifications, kdbusaddons
+}:
+
+plasmaPackage {
+  name = "kwrited";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ kcoreaddons kpty knotifications kdbusaddons ];
+  propagatedBuildInputs = [ ki18n ];
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/libkscreen/default.nix b/pkgs/desktops/kde-5/plasma-5.5/libkscreen/default.nix
new file mode 100644
index 000000000000..9fccbd6834c3
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/libkscreen/default.nix
@@ -0,0 +1,18 @@
+{ plasmaPackage
+, extra-cmake-modules
+, libXrandr
+, qtx11extras
+}:
+
+plasmaPackage {
+  name = "libkscreen";
+  nativeBuildInputs = [
+    extra-cmake-modules
+  ];
+  buildInputs = [
+    libXrandr
+  ];
+  propagatedBuildInputs = [
+    qtx11extras
+  ];
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/libksysguard/0001-qdiriterator-follow-symlinks.patch b/pkgs/desktops/kde-5/plasma-5.5/libksysguard/0001-qdiriterator-follow-symlinks.patch
new file mode 100644
index 000000000000..fbbb11ae7556
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/libksysguard/0001-qdiriterator-follow-symlinks.patch
@@ -0,0 +1,25 @@
+From 46164a50de4102d02ae9d1d480acdd4b12303db8 Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@gmail.com>
+Date: Wed, 14 Oct 2015 07:07:22 -0500
+Subject: [PATCH] qdiriterator follow symlinks
+
+---
+ processui/scripting.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/processui/scripting.cpp b/processui/scripting.cpp
+index efed8ff..841761a 100644
+--- a/processui/scripting.cpp
++++ b/processui/scripting.cpp
+@@ -167,7 +167,7 @@ void Scripting::loadContextMenu() {
+     QStringList scripts;
+     const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "ksysguard/scripts/", QStandardPaths::LocateDirectory);
+     Q_FOREACH (const QString& dir, dirs) {
+-        QDirIterator it(dir, QStringList() << QStringLiteral("*.desktop"), QDir::NoFilter, QDirIterator::Subdirectories);
++        QDirIterator it(dir, QStringList() << QStringLiteral("*.desktop"), QDir::NoFilter, QDirIterator::Subdirectories | QDirIterator::FollowSymlinks);
+         while (it.hasNext()) {
+             scripts.append(it.next());
+         }
+-- 
+2.5.2
+
diff --git a/pkgs/desktops/kde-5/plasma-5.5/libksysguard/default.nix b/pkgs/desktops/kde-5/plasma-5.5/libksysguard/default.nix
new file mode 100644
index 000000000000..373221b2b305
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/libksysguard/default.nix
@@ -0,0 +1,21 @@
+{ plasmaPackage, extra-cmake-modules, kauth, kcompletion
+, kconfigwidgets, kcoreaddons, kservice, kwidgetsaddons
+, kwindowsystem, plasma-framework, qtscript, qtwebkit, qtx11extras
+, kconfig, ki18n, kiconthemes
+}:
+
+plasmaPackage {
+  name = "libksysguard";
+  patches = [ ./0001-qdiriterator-follow-symlinks.patch ];
+  nativeBuildInputs = [
+    extra-cmake-modules
+  ];
+  buildInputs = [
+    kcompletion kconfigwidgets kcoreaddons kservice
+    kwidgetsaddons qtscript qtwebkit
+  ];
+  propagatedBuildInputs = [
+    kauth kconfig ki18n kiconthemes kwindowsystem plasma-framework
+    qtx11extras
+  ];
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/milou.nix b/pkgs/desktops/kde-5/plasma-5.5/milou.nix
new file mode 100644
index 000000000000..760de2d79ab4
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/milou.nix
@@ -0,0 +1,17 @@
+{ plasmaPackage, extra-cmake-modules, qtscript, qtdeclarative
+, kcoreaddons, ki18n, kdeclarative, kservice, plasma-framework
+, krunner
+}:
+
+plasmaPackage {
+  name = "milou";
+  nativeBuildInputs = [
+    extra-cmake-modules
+  ];
+  buildInputs = [
+    qtscript kcoreaddons kservice
+  ];
+  propagatedBuildInputs = [
+    kdeclarative ki18n krunner plasma-framework qtdeclarative
+  ];
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/oxygen.nix b/pkgs/desktops/kde-5/plasma-5.5/oxygen.nix
new file mode 100644
index 000000000000..02918100408a
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/oxygen.nix
@@ -0,0 +1,20 @@
+{ plasmaPackage, extra-cmake-modules, ki18n, kcmutils, kconfig
+, kdecoration, kguiaddons, kwidgetsaddons, kservice, kcompletion
+, frameworkintegration, kwindowsystem, makeQtWrapper, qtx11extras
+}:
+
+plasmaPackage {
+  name = "oxygen";
+  nativeBuildInputs = [
+    extra-cmake-modules makeQtWrapper
+  ];
+  buildInputs = [
+    kcmutils kconfig kdecoration kguiaddons kwidgetsaddons
+    kservice kcompletion
+  ];
+  propagatedBuildInputs = [ frameworkintegration ki18n kwindowsystem qtx11extras ];
+  postInstall = ''
+    wrapQtProgram "$out/bin/oxygen-demo5"
+    wrapQtProgram "$out/bin/oxygen-settings5"
+  '';
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/plasma-desktop/0001-qt-5.5-QML-import-paths.patch b/pkgs/desktops/kde-5/plasma-5.5/plasma-desktop/0001-qt-5.5-QML-import-paths.patch
new file mode 100644
index 000000000000..ead7452daa84
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/plasma-desktop/0001-qt-5.5-QML-import-paths.patch
@@ -0,0 +1,67 @@
+From 7c379686def9f15be1aa8fa4b5358124f7ed57c6 Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@gmail.com>
+Date: Mon, 19 Oct 2015 18:45:36 -0500
+Subject: [PATCH 1/3] qt-5.5 QML import paths
+
+---
+ applets/pager/package/contents/ui/main.qml              | 2 +-
+ containments/desktop/package/contents/ui/FolderView.qml | 2 +-
+ containments/desktop/package/contents/ui/main.qml       | 2 +-
+ containments/panel/contents/ui/main.qml                 | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/applets/pager/package/contents/ui/main.qml b/applets/pager/package/contents/ui/main.qml
+index 0c367c6..c9a82be 100644
+--- a/applets/pager/package/contents/ui/main.qml
++++ b/applets/pager/package/contents/ui/main.qml
+@@ -23,7 +23,7 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
+ 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
+diff --git a/containments/desktop/package/contents/ui/FolderView.qml b/containments/desktop/package/contents/ui/FolderView.qml
+index 578ec87..04e088c 100644
+--- a/containments/desktop/package/contents/ui/FolderView.qml
++++ b/containments/desktop/package/contents/ui/FolderView.qml
+@@ -27,7 +27,7 @@ import org.kde.plasma.extras 2.0 as PlasmaExtras
+ 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
+diff --git a/containments/desktop/package/contents/ui/main.qml b/containments/desktop/package/contents/ui/main.qml
+index 422e8f7..3c8906e 100644
+--- a/containments/desktop/package/contents/ui/main.qml
++++ b/containments/desktop/package/contents/ui/main.qml
+@@ -29,7 +29,7 @@ import org.kde.kquickcontrolsaddons 2.0 as KQuickControlsAddons
+ 
+ import org.kde.private.desktopcontainment.desktop 0.1 as Desktop
+ 
+-import "LayoutManager.js" as LayoutManager
++import "../code/LayoutManager.js" as LayoutManager
+ 
+ DragDrop.DropArea {
+     id: root
+diff --git a/containments/panel/contents/ui/main.qml b/containments/panel/contents/ui/main.qml
+index bad6ba0..b1fc331 100644
+--- a/containments/panel/contents/ui/main.qml
++++ b/containments/panel/contents/ui/main.qml
+@@ -25,7 +25,7 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
+ 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
+-- 
+2.6.3
+
diff --git a/pkgs/desktops/kde-5/plasma-5.5/plasma-desktop/0002-hwclock.patch b/pkgs/desktops/kde-5/plasma-5.5/plasma-desktop/0002-hwclock.patch
new file mode 100644
index 000000000000..17b01486d928
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/plasma-desktop/0002-hwclock.patch
@@ -0,0 +1,36 @@
+From d0056fa6c1158408db169a7f5e6eb75691083094 Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@gmail.com>
+Date: Sun, 22 Nov 2015 09:34:43 -0600
+Subject: [PATCH 2/3] hwclock
+
+---
+ kcms/dateandtime/helper.cpp | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/kcms/dateandtime/helper.cpp b/kcms/dateandtime/helper.cpp
+index e955f0c..5171753 100644
+--- a/kcms/dateandtime/helper.cpp
++++ b/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"));
+     }
+-- 
+2.6.3
+
diff --git a/pkgs/desktops/kde-5/plasma-5.5/plasma-desktop/0003-tzdir.patch b/pkgs/desktops/kde-5/plasma-5.5/plasma-desktop/0003-tzdir.patch
new file mode 100644
index 000000000000..aba97b032f8a
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/plasma-desktop/0003-tzdir.patch
@@ -0,0 +1,30 @@
+From 0a8e2ae5cb64c5762408df920d99459b20d52b29 Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@gmail.com>
+Date: Sun, 22 Nov 2015 09:39:24 -0600
+Subject: [PATCH 3/3] tzdir
+
+---
+ kcms/dateandtime/helper.cpp | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/kcms/dateandtime/helper.cpp b/kcms/dateandtime/helper.cpp
+index 5171753..92b5d9e 100644
+--- a/kcms/dateandtime/helper.cpp
++++ b/kcms/dateandtime/helper.cpp
+@@ -181,7 +181,12 @@ int ClockHelper::tz( const QString& selectedzone )
+ 
+     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"));
+-- 
+2.6.3
+
diff --git a/pkgs/desktops/kde-5/plasma-5.5/plasma-desktop/default.nix b/pkgs/desktops/kde-5/plasma-5.5/plasma-desktop/default.nix
new file mode 100644
index 000000000000..5f27efc7f24c
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/plasma-desktop/default.nix
@@ -0,0 +1,86 @@
+{ plasmaPackage, substituteAll, extra-cmake-modules, kdoctools
+, attica, baloo, boost, fontconfig, kactivities, kauth, kcmutils
+, kdbusaddons, kdeclarative, kded, kdelibs4support, kemoticons
+, kglobalaccel, ki18n, kitemmodels, knewstuff, knotifications
+, knotifyconfig, kpeople, krunner, kwallet, kwin, phonon
+, plasma-framework, plasma-workspace, qtdeclarative, qtx11extras
+, qtsvg, libXcursor, libXft, libxkbfile, xf86inputevdev
+, xf86inputsynaptics, xinput, xkeyboard_config, xorgserver
+, libcanberra_kde, libpulseaudio, makeQtWrapper, utillinux
+, qtquick1, qtquickcontrols
+}:
+
+plasmaPackage rec {
+  name = "plasma-desktop";
+  nativeBuildInputs = [
+    extra-cmake-modules
+    kdoctools
+    makeQtWrapper
+  ];
+  buildInputs = [
+    attica
+    boost
+    fontconfig
+    kcmutils
+    kdbusaddons
+    kded
+    kitemmodels
+    knewstuff
+    knotifications
+    knotifyconfig
+    kwallet
+    libcanberra_kde
+    libXcursor
+    libpulseaudio
+    libXft
+    libxkbfile
+    phonon
+    qtsvg
+    xf86inputevdev
+    xf86inputsynaptics
+    xkeyboard_config
+    xinput
+  ];
+  propagatedBuildInputs = [
+    baloo
+    kactivities
+    kauth
+    kdeclarative
+    kdelibs4support
+    kemoticons
+    kglobalaccel
+    ki18n
+    kpeople
+    krunner
+    kwin
+    plasma-framework
+    plasma-workspace
+    qtdeclarative
+    qtquick1
+    qtquickcontrols
+    qtx11extras
+  ];
+  patches = [
+    ./0001-qt-5.5-QML-import-paths.patch
+    (substituteAll {
+      src = ./0002-hwclock.patch;
+      hwclock = "${utillinux}/sbin/hwclock";
+    })
+    ./0003-tzdir.patch
+  ];
+  NIX_CFLAGS_COMPILE = [ "-I${xorgserver}/include/xorg" ];
+  cmakeFlags = [
+    "-DEvdev_INCLUDE_DIRS=${xf86inputevdev}/include/xorg"
+    "-DSynaptics_INCLUDE_DIRS=${xf86inputsynaptics}/include/xorg"
+  ];
+  postInstall = ''
+    wrapQtProgram "$out/bin/kaccess"
+    wrapQtProgram "$out/bin/solid-action-desktop-gen"
+    wrapQtProgram "$out/bin/knetattach"
+    wrapQtProgram "$out/bin/krdb"
+    wrapQtProgram "$out/bin/kapplymousetheme"
+    wrapQtProgram "$out/bin/kfontinst"
+    wrapQtProgram "$out/bin/kcm-touchpad-list-devices"
+    wrapQtProgram "$out/bin/kfontview"
+  '';
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/plasma-mediacenter.nix b/pkgs/desktops/kde-5/plasma-5.5/plasma-mediacenter.nix
new file mode 100644
index 000000000000..7088f45d64e2
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/plasma-mediacenter.nix
@@ -0,0 +1,20 @@
+{ plasmaPackage, extra-cmake-modules, baloo, kactivities, kconfig
+, kcoreaddons, kdeclarative, kguiaddons, ki18n, kio, kservice
+, kfilemetadata, plasma-framework, qtdeclarative, qtmultimedia
+, taglib
+}:
+
+plasmaPackage rec {
+  name = "plasma-mediacenter";
+  nativeBuildInputs = [
+    extra-cmake-modules
+  ];
+  buildInputs = [
+    kconfig kcoreaddons kguiaddons kservice
+    qtdeclarative qtmultimedia taglib
+  ];
+  propagatedBuildInputs = [
+    baloo kactivities kdeclarative kfilemetadata ki18n kio
+    plasma-framework
+  ];
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/plasma-nm/0001-mobile-broadband-provider-info-path.patch b/pkgs/desktops/kde-5/plasma-5.5/plasma-nm/0001-mobile-broadband-provider-info-path.patch
new file mode 100644
index 000000000000..79b5cfb437e2
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/plasma-nm/0001-mobile-broadband-provider-info-path.patch
@@ -0,0 +1,25 @@
+From faf13c97ff1192a201843b9d52f4002dbd9022af Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@gmail.com>
+Date: Sun, 25 Oct 2015 09:09:27 -0500
+Subject: [PATCH] mobile-broadband-provider-info path
+
+---
+ libs/editor/mobileproviders.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libs/editor/mobileproviders.cpp b/libs/editor/mobileproviders.cpp
+index 568cb34..98a5992 100644
+--- a/libs/editor/mobileproviders.cpp
++++ b/libs/editor/mobileproviders.cpp
+@@ -26,7 +26,7 @@
+ 
+ #include <KLocale>
+ 
+-const QString MobileProviders::ProvidersFile = "/usr/share/mobile-broadband-provider-info/serviceproviders.xml";
++const QString MobileProviders::ProvidersFile = "@mobile_broadband_provider_info@/share/mobile-broadband-provider-info/serviceproviders.xml";
+ 
+ bool localeAwareCompare(const QString & one, const QString & two) {
+     return one.localeAwareCompare(two) < 0;
+-- 
+2.6.2
+
diff --git a/pkgs/desktops/kde-5/plasma-5.5/plasma-nm/default.nix b/pkgs/desktops/kde-5/plasma-5.5/plasma-nm/default.nix
new file mode 100644
index 000000000000..249c6d8aac94
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/plasma-nm/default.nix
@@ -0,0 +1,36 @@
+{ plasmaPackage, substituteAll, extra-cmake-modules, kdoctools
+, kcompletion, kconfigwidgets, kcoreaddons, kdbusaddons, kdeclarative
+, kdelibs4support, ki18n, kiconthemes, kinit, kio, kitemviews
+, knotifications, kservice, kwallet, kwidgetsaddons, kwindowsystem
+, kxmlgui, makeQtWrapper, mobile_broadband_provider_info
+, modemmanager-qt, networkmanager-qt, openconnect, plasma-framework
+, qca-qt5, qtdeclarative, solid
+}:
+
+plasmaPackage {
+  name = "plasma-nm";
+  patches = [
+    (substituteAll {
+      src = ./0001-mobile-broadband-provider-info-path.patch;
+      inherit mobile_broadband_provider_info;
+    })
+  ];
+  nativeBuildInputs = [
+    extra-cmake-modules
+    kdoctools
+    makeQtWrapper
+  ];
+  buildInputs = [
+    kcompletion kconfigwidgets kcoreaddons kdbusaddons kiconthemes
+    kinit kitemviews knotifications kservice kwallet kwidgetsaddons
+    kxmlgui mobile_broadband_provider_info modemmanager-qt
+    networkmanager-qt openconnect qca-qt5 solid
+  ];
+  propagatedBuildInputs = [
+    kdeclarative kdelibs4support ki18n kio kwindowsystem plasma-framework
+    qtdeclarative
+  ];
+  postInstall = ''
+    wrapQtProgram "$out/bin/kde5-nm-connection-editor"
+  '';
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/plasma-pa.nix b/pkgs/desktops/kde-5/plasma-5.5/plasma-pa.nix
new file mode 100644
index 000000000000..ff56d1199b15
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/plasma-pa.nix
@@ -0,0 +1,18 @@
+{ plasmaPackage, extra-cmake-modules, glib, kdoctools, kconfigwidgets
+, kcoreaddons, kdeclarative, kglobalaccel, ki18n, libpulseaudio
+, plasma-framework
+}:
+
+plasmaPackage {
+  name = "plasma-pa";
+  nativeBuildInputs = [
+    extra-cmake-modules
+    kdoctools
+  ];
+  buildInputs = [
+    glib kconfigwidgets kcoreaddons libpulseaudio
+  ];
+  propagatedBuildInputs = [
+    kdeclarative kglobalaccel ki18n plasma-framework
+  ];
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/plasma-workspace-wallpapers.nix b/pkgs/desktops/kde-5/plasma-5.5/plasma-workspace-wallpapers.nix
new file mode 100644
index 000000000000..bc87abcad153
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/plasma-workspace-wallpapers.nix
@@ -0,0 +1,10 @@
+{ plasmaPackage
+, extra-cmake-modules
+}:
+
+plasmaPackage {
+  name = "plasma-workspace-wallpapers";
+  nativeBuildInputs = [
+    extra-cmake-modules
+  ];
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/plasma-workspace/default.nix b/pkgs/desktops/kde-5/plasma-5.5/plasma-workspace/default.nix
new file mode 100644
index 000000000000..01c5c63ce0aa
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/plasma-workspace/default.nix
@@ -0,0 +1,84 @@
+{ 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, qttools, dbus_tools, mkfontdir, xmessage
+, xprop, xrdb, xset, xsetroot, solid, qtquickcontrols
+}:
+
+plasmaPackage {
+  name = "plasma-workspace";
+
+  nativeBuildInputs = [
+    extra-cmake-modules
+    kdoctools
+    makeQtWrapper
+  ];
+  buildInputs = [
+    dbus_tools kcmutils kconfig kcrash kdbusaddons kdesu kdewebkit
+    kinit kjsembed knewstuff knotifyconfig kpackage kservice
+    ktextwidgets kwallet kwayland kxmlrpcclient libdbusmenu libSM
+    libXcursor mkfontdir networkmanager-qt pam phonon qtscript qttools
+    socat wayland xmessage xprop xset xsetroot
+  ];
+  propagatedBuildInputs = [
+    baloo kactivities kdeclarative kdelibs4support kglobalaccel
+    kidletime krunner ktexteditor kwin libkscreen libksysguard
+    plasma-framework qtquick1 qtquickcontrols qtx11extras solid
+  ];
+
+  patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
+
+  postPatch = ''
+    substituteInPlace startkde/startkde.cmake \
+        --subst-var-by bash $(type -P bash) \
+        --subst-var-by sed $(type -P sed) \
+        --subst-var-by grep $(type -P grep) \
+        --subst-var-by socat $(type -P socat) \
+        --subst-var-by kcheckrunning $(type -P kcheckrunning) \
+        --subst-var-by xmessage $(type -P xmessage) \
+        --subst-var-by tr $(type -P tr) \
+        --subst-var-by qtpaths $(type -P qtpaths) \
+        --subst-var-by qdbus $(type -P qdbus) \
+        --subst-var-by dbus-launch $(type -P dbus-launch) \
+        --subst-var-by mkfontdir $(type -P mkfontdir) \
+        --subst-var-by xset $(type -P xset) \
+        --subst-var-by xsetroot $(type -P xsetroot) \
+        --subst-var-by xprop $(type -P xprop) \
+        --subst-var-by start_kdeinit_wrapper "${kinit.out}/lib/libexec/kf5/start_kdeinit_wrapper" \
+        --subst-var-by kwrapper5 $(type -P kwrapper5) \
+        --subst-var-by kdeinit5_shutdown $(type -P kdeinit5_shutdown) \
+        --subst-var-by kbuildsycoca5 $(type -P kbuildsycoca5) \
+        --subst-var-by kreadconfig5 $(type -P kreadconfig5) \
+        --subst-var out
+    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"
+    wrapQtProgram "$out/bin/ksplashqml"
+    wrapQtProgram "$out/bin/kcheckrunning"
+    wrapQtProgram "$out/bin/systemmonitor"
+    wrapQtProgram "$out/bin/kstartupconfig5"
+    wrapQtProgram "$out/bin/kdostartupconfig5"
+    wrapQtProgram "$out/bin/klipper"
+    wrapQtProgram "$out/bin/kuiserver5"
+    wrapQtProgram "$out/bin/krunner"
+    wrapQtProgram "$out/bin/plasmashell"
+    wrapQtProgram "$out/lib/libexec/drkonqi"
+  '';
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/plasma-workspace/qml-import-path.patch b/pkgs/desktops/kde-5/plasma-5.5/plasma-workspace/qml-import-path.patch
new file mode 100644
index 000000000000..1d34001be597
--- /dev/null
+++ b/pkgs/desktops/kde-5/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/kde-5/plasma-5.5/plasma-workspace/series b/pkgs/desktops/kde-5/plasma-5.5/plasma-workspace/series
new file mode 100644
index 000000000000..88b54af793e7
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/plasma-workspace/series
@@ -0,0 +1,2 @@
+startkde.patch
+qml-import-path.patch
diff --git a/pkgs/desktops/kde-5/plasma-5.5/plasma-workspace/startkde.patch b/pkgs/desktops/kde-5/plasma-5.5/plasma-workspace/startkde.patch
new file mode 100644
index 000000000000..17c0ccf0ca93
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/plasma-workspace/startkde.patch
@@ -0,0 +1,375 @@
+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@
+ #
+ #  DEFAULT KDE STARTUP SCRIPT ( @PROJECT_VERSION@ )
+ #
+ 
++set -x
++
++# The KDE icon cache is supposed to update itself
++# automatically, but it uses the timestamp on the icon
++# theme directory as a trigger.  Since in Nix the
++# timestamp is always the same, this doesn't work.  So as
++# a workaround, nuke the icon cache on login.  This isn't
++# perfect, since it may require logging out after
++# installing new applications to update the cache.
++# See http://lists-archives.org/kde-devel/26175-what-when-will-icon-cache-refresh.html
++rm -fv $HOME/.cache/icon-cache.kcache
++
++# Qt writes a weird ‘libraryPath’ line to
++# ~/.config/Trolltech.conf that causes the KDE plugin
++# paths of previous KDE invocations to be searched.
++# Obviously using mismatching KDE libraries is potentially
++# disastrous, so here we nuke references to the Nix store
++# in Trolltech.conf.  A better solution would be to stop
++# Qt from doing this wackiness in the first place.
++if [ -e $HOME/.config/Trolltech.conf ]; then
++    @sed@ -e '/nix\\store\|nix\/store/ d' -i $HOME/.config/Trolltech.conf
++fi
++
+ if test "x$1" = x--failsafe; then
+     KDE_FAILSAFE=1 # General failsafe flag
+     KWIN_COMPOSE=N # Disable KWin's compositing
+@@ -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
+ 
+-# in case we have been started with full pathname spec without being in PATH
+-bindir=`echo "$0" | sed -n 's,^\(/.*\)/[^/][^/]*$,\1,p'`
+-if [ -n "$bindir" ]; then
+-  qbindir=`qtpaths --binaries-dir`
+-  qdbus=$qbindir/qdbus
+-  case $PATH in
+-    $bindir|$bindir:*|*:$bindir|*:$bindir:*) ;;
+-    *) PATH=$bindir:$PATH; export PATH;;
+-  esac
+-else
+-  qdbus=qdbus
+-fi
+-
+ # Check if a KDE session already is running and whether it's possible to connect to X
+-kcheckrunning
++@kcheckrunning@
+ kcheckrunning_result=$?
+ if test $kcheckrunning_result -eq 0 ; then
+-	echo "KDE seems to be already running on this display."
+-	xmessage -geometry 500x100 "KDE seems to be already running on this display." > /dev/null 2>/dev/null
++  echo "KDE seems to be already running on this display."
++  @xmessage@ -geometry 500x100 "KDE seems to be already running on this display."
+ 	exit 1
+ elif test $kcheckrunning_result -eq 2 ; then
+ 	echo "\$DISPLAY is not set or cannot connect to the X server."
+-        exit 1
++  exit 1
+ fi
+ 
+ # Boot sequence:
+@@ -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
+-if [  ${XDG_CONFIG_HOME} ]; then
+-  configDir=$XDG_CONFIG_HOME;
+-else
+-  configDir=${HOME}/.config; #this is the default, http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
+-fi
+-
+-mkdir -p $configDir
++configDir=$(@qtpaths@ --writable-path GenericConfigLocation)
++mkdir -p "$configDir"
+ 
+ #This is basically setting defaults so we can use them with kstartupconfig5
+ cat >$configDir/startupconfigkeys <<EOF
+@@ -102,42 +107,10 @@ XftSubPixel=none
+ EOF
+ }
+ 
+-# Make sure the Oxygen font is installed
+-# This is necessary for setups where CMAKE_INSTALL_PREFIX
+-# is not in /usr. fontconfig looks in /usr, ~/.fonts and
+-# $XDG_DATA_HOME for fonts. In this case, we symlink the
+-# Oxygen font under ${XDG_DATA_HOME} and make it known to
+-# fontconfig
+-
+-usr_share="/usr/share"
+-install_share="@KDE_INSTALL_FULL_DATADIR@"
+-
+-if [ ! $install_share = $usr_share ]; then
+-
+-    if [ ${XDG_DATA_HOME} ]; then
+-        fontsDir="${XDG_DATA_HOME}/fonts"
+-    else
+-        fontsDir="${HOME}/.fonts"
+-    fi
+-
+-    test -d $fontsDir || {
+-        mkdir -p $fontsDir
+-    }
+-
+-    oxygenDir=$fontsDir/oxygen
+-    prefixDir="@KDE_INSTALL_FULL_DATADIR@/fonts/oxygen"
+-
+-    # if the oxygen dir doesn't exist, create a symlink to be sure that the
+-    # Oxygen font is available to the user
+-    test -d $oxygenDir || test -d $prefixDir && {
+-        test -h $oxygenDir || ln -s $prefixDir $oxygenDir && fc-cache $oxygenDir
+-    }
+-fi
+-
+-kstartupconfig5
++@out@/bin/kstartupconfig5
+ returncode=$?
+ if test $returncode -ne 0; then
+-    xmessage -geometry 500x100 "kstartupconfig5 does not exist or fails. The error code is $returncode. Check your installation."
++    @xmessage@ -geometry 500x100 "kstartupconfig5 does not exist or fails. The error code is $returncode. Check your installation."
+     exit 1
+ fi
+ [ -r $configDir/startupconfig ] && . $configDir/startupconfig
+@@ -146,9 +119,11 @@ if test "$kdeglobals_kscreen_scalefactor
+     export QT_DEVICE_PIXEL_RATIO=$kdeglobals_kscreen_scalefactor
+ fi
+ 
++XCURSOR_PATH=~/.icons:$(echo "$XDG_DATA_DIRS" | @tr@ ":" "\n" | @sed@ 's,$,/icons,g' | @tr@ "\n" ":")
++export XCURSOR_PATH
++
+ # XCursor mouse theme needs to be applied here to work even for kded or ksmserver
+ if test -n "$kcminputrc_mouse_cursortheme" -o -n "$kcminputrc_mouse_cursorsize" ; then
+-    @EXPORT_XCURSOR_PATH@
+ 
+     kapplymousetheme "$kcminputrc_mouse_cursortheme" "$kcminputrc_mouse_cursorsize"
+     if test $? -eq 10; then
+@@ -164,21 +139,39 @@ if test -n "$kcminputrc_mouse_cursorthem
+     fi
+ fi
+ 
+-if test "$kcmfonts_general_forcefontdpi" -ne 0; then
+-    xrdb -quiet -merge -nocpp <<EOF
+-Xft.dpi: $kcmfonts_general_forcefontdpi
+-EOF
+-fi
++# Set a left cursor instead of the standard X11 "X" cursor, since I've heard
++# from some users that they're confused and don't know what to do. This is
++# especially necessary on slow machines, where starting KDE takes one or two
++# minutes until anything appears on the screen.
++#
++# If the user has overwritten fonts, the cursor font may be different now
++# so don't move this up.
++#
++@xsetroot@ -cursor_name left_ptr
+ 
+ dl=$DESKTOP_LOCKED
+ unset DESKTOP_LOCKED # Don't want it in the environment
+ 
++# Make sure that D-Bus is running
++# D-Bus autolaunch is broken
++if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
++    eval `@dbus-launch@ --sh-syntax --exit-with-session`
++fi
++if @qdbus@ >/dev/null 2>/dev/null; then
++    : # ok
++else
++    echo 'startkde: Could not start D-Bus. Can you call qdbus?'  1>&2
++    test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null
++    @xmessage@ -geometry 500x100 "Could not start D-Bus. Can you call qdbus?"
++    exit 1
++fi
++
+ ksplash_pid=
+ if test -z "$dl"; then
+   # the splashscreen and progress indicator
+   case "$ksplashrc_ksplash_engine" in
+     KSplashQML)
+-      ksplash_pid=`ksplashqml "${ksplashrc_ksplash_theme}" --pid`
++      ksplash_pid=`@out@/bin/ksplashqml "${ksplashrc_ksplash_theme}" --pid`
+       ;;
+     None)
+       ;;
+@@ -201,8 +194,7 @@ fi
+ # For anything else (that doesn't set env vars, or that needs a window manager),
+ # better use the Autostart folder.
+ 
+-# TODO: Use GenericConfigLocation once we depend on Qt 5.4
+-scriptpath=`qtpaths --paths ConfigLocation | tr ':' '\n' | sed 's,$,/plasma-workspace,g'`
++scriptpath=$(@qtpaths@ --paths GenericConfigLocation | tr ':' '\n' | @sed@ 's,$,/plasma-workspace,g')
+ 
+ # Add /env/ to the directory to locate the scripts to be sourced
+ for prefix in `echo $scriptpath`; do
+@@ -232,7 +224,7 @@ usr_odir=$HOME/.fonts/kde-override
+ usr_fdir=$HOME/.fonts
+ 
+ if test -n "$KDEDIRS"; then
+-  kdedirs_first=`echo "$KDEDIRS"|sed -e 's/:.*//'`
++  kdedirs_first=`echo "$KDEDIRS" | @sed@ -e 's/:.*//'`
+   sys_odir=$kdedirs_first/share/fonts/override
+   sys_fdir=$kdedirs_first/share/fonts
+ else
+@@ -245,23 +237,13 @@ fi
+ # add the user's dirs to the font path, as they might simply have been made
+ # read-only by the administrator, for whatever reason.
+ 
+-test -d "$sys_odir" && xset +fp "$sys_odir"
+-test -d "$usr_odir" && (mkfontdir "$usr_odir" ; xset +fp "$usr_odir")
+-test -d "$usr_fdir" && (mkfontdir "$usr_fdir" ; xset fp+ "$usr_fdir")
+-test -d "$sys_fdir" && xset fp+ "$sys_fdir"
++test -d "$sys_odir" && @xset@ +fp "$sys_odir"
++test -d "$usr_odir" && ( @mkfontdir@ "$usr_odir" ; @xset@ +fp "$usr_odir" )
++test -d "$usr_fdir" && ( @mkfontdir@ "$usr_fdir" ; @xset@ fp+ "$usr_fdir" )
++test -d "$sys_fdir" && @xset@ fp+ "$sys_fdir"
+ 
+ # Ask X11 to rebuild its font list.
+-xset fp rehash
+-
+-# Set a left cursor instead of the standard X11 "X" cursor, since I've heard
+-# from some users that they're confused and don't know what to do. This is
+-# especially necessary on slow machines, where starting KDE takes one or two
+-# minutes until anything appears on the screen.
+-#
+-# If the user has overwritten fonts, the cursor font may be different now
+-# so don't move this up.
+-#
+-xsetroot -cursor_name left_ptr
++@xset@ fp rehash
+ 
+ # Get Ghostscript to look into user's KDE fonts dir for additional Fontmap
+ if test -n "$GS_LIB" ; then
+@@ -274,26 +256,6 @@ fi
+ 
+ echo 'startkde: Starting up...'  1>&2
+ 
+-# Make sure that the KDE prefix is first in XDG_DATA_DIRS and that it's set at all.
+-# The spec allows XDG_DATA_DIRS to be not set, but X session startup scripts tend
+-# to set it to a list of paths *not* including the KDE prefix if it's not /usr or
+-# /usr/local.
+-if test -z "$XDG_DATA_DIRS"; then
+-    XDG_DATA_DIRS="@CMAKE_INSTALL_PREFIX@/@SHARE_INSTALL_PREFIX@:/usr/share:/usr/local/share"
+-fi
+-export XDG_DATA_DIRS
+-
+-# Make sure that D-Bus is running
+-if $qdbus >/dev/null 2>/dev/null; then
+-    : # ok
+-else
+-    echo 'startkde: Could not start D-Bus. Can you call qdbus?'  1>&2
+-    test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null
+-    xmessage -geometry 500x100 "Could not start D-Bus. Can you call qdbus?"
+-    exit 1
+-fi
+-
+-
+ # 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
+@@ -318,11 +280,11 @@ fi
+ #
+ KDE_FULL_SESSION=true
+ export KDE_FULL_SESSION
+-xprop -root -f KDE_FULL_SESSION 8t -set KDE_FULL_SESSION true
++@xprop@ -root -f KDE_FULL_SESSION 8t -set KDE_FULL_SESSION true
+ 
+ KDE_SESSION_VERSION=5
+ export KDE_SESSION_VERSION
+-xprop -root -f KDE_SESSION_VERSION 32c -set KDE_SESSION_VERSION 5
++@xprop@ -root -f KDE_SESSION_VERSION 32c -set KDE_SESSION_VERSION 5
+ 
+ KDE_SESSION_UID=`id -ru`
+ export KDE_SESSION_UID
+@@ -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
+-    env | socat STDIN UNIX-CONNECT:$PAM_KWALLET_LOGIN
++    env | @socat@ STDIN UNIX-CONNECT:$PAM_KWALLET_LOGIN
+ fi
+ # ...and also to kwalletd5
+ if test -n "$PAM_KWALLET5_LOGIN" ; then
+-    env | socat STDIN UNIX-CONNECT:$PAM_KWALLET5_LOGIN
++    env | @socat@ STDIN UNIX-CONNECT:$PAM_KWALLET5_LOGIN
+ fi
+ 
+ # At this point all environment variables are set, let's send it to the DBus session server to update the activation environment
+@@ -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
+-  xmessage -geometry 500x100 "Could not sync environment to dbus."
++  @xmessage@ -geometry 500x100 "Could not sync environment to dbus."
+   exit 1
+ fi
+ 
+ # We set LD_BIND_NOW to increase the efficiency of kdeinit.
+ # kdeinit unsets this variable before loading applications.
+-LD_BIND_NOW=true @CMAKE_INSTALL_FULL_LIBEXECDIR_KF5@/start_kdeinit_wrapper --kded +kcminit_startup
++LD_BIND_NOW=true @start_kdeinit_wrapper@ --kded +kcminit_startup
+ if test $? -ne 0; then
+   # Startup error
+   echo 'startkde: Could not start kdeinit5. Check your installation.'  1>&2
+   test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null
+-  xmessage -geometry 500x100 "Could not start kdeinit5. Check your installation."
++  @xmessage@ -geometry 500x100 "Could not start kdeinit5. Check your installation."
+   exit 1
+ fi
+ 
++# (NixOS) We run kbuildsycoca5 before starting the user session because things
++# may be missing or moved if they have run nixos-rebuild and it may not be
++# possible for them to start Konsole to run it manually!
++@kbuildsycoca5@
++
+ # 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
+@@ -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"
+-kwrapper5 @CMAKE_INSTALL_FULL_BINDIR@/ksmserver $KDEWM $KSMSERVEROPTIONS
++@kwrapper5@ @CMAKE_INSTALL_FULL_BINDIR@/ksmserver $KDEWM $KSMSERVEROPTIONS
+ if test $? -eq 255; then
+   # Startup error
+   echo 'startkde: Could not start ksmserver. Check your installation.'  1>&2
+   test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null
+-  xmessage -geometry 500x100 "Could not start ksmserver. Check your installation."
++  @xmessage@ -geometry 500x100 "Could not start ksmserver. Check your installation."
+ fi
+ 
+-wait_drkonqi=`kreadconfig5 --file startkderc --group WaitForDrKonqi --key Enabled --default true`
++wait_drkonqi=`@kreadconfig5@ --file startkderc --group WaitForDrKonqi --key Enabled --default true`
+ 
+ if test x"$wait_drkonqi"x = x"true"x ; then
+     # wait for remaining drkonqi instances with timeout (in seconds)
+-    wait_drkonqi_timeout=`kreadconfig5 --file startkderc --group WaitForDrKonqi --key Timeout --default 900`
++    wait_drkonqi_timeout=`@kreadconfig5@ --file startkderc --group WaitForDrKonqi --key Timeout --default 900`
+     wait_drkonqi_counter=0
+-    while $qdbus | grep "^[^w]*org.kde.drkonqi" > /dev/null ; do
++    while @qdbus@ | @grep@ "^[^w]*org.kde.drkonqi" > /dev/null ; do
+         sleep 5
+         wait_drkonqi_counter=$((wait_drkonqi_counter+5))
+         if test "$wait_drkonqi_counter" -ge "$wait_drkonqi_timeout" ; then
+             # ask remaining drkonqis to die in a graceful way
+-            $qdbus | grep 'org.kde.drkonqi-' | while read address ; do
+-                $qdbus "$address" "/MainApplication" "quit"
++            @qdbus@ | @grep@ 'org.kde.drkonqi-' | while read address ; do
++                @qdbus@ "$address" "/MainApplication" "quit"
+             done
+             break
+         fi
+@@ -411,12 +378,12 @@ echo 'startkde: Shutting down...'  1>&2
+ test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null
+ 
+ # Clean up
+-kdeinit5_shutdown
++@kdeinit5_shutdown@
+ 
+ unset KDE_FULL_SESSION
+-xprop -root -remove KDE_FULL_SESSION
++@xprop@ -root -remove KDE_FULL_SESSION
+ unset KDE_SESSION_VERSION
+-xprop -root -remove KDE_SESSION_VERSION
++@xprop@ -root -remove KDE_SESSION_VERSION
+ unset KDE_SESSION_UID
+ 
+ echo 'startkde: Done.'  1>&2
diff --git a/pkgs/desktops/kde-5/plasma-5.5/polkit-kde-agent.nix b/pkgs/desktops/kde-5/plasma-5.5/polkit-kde-agent.nix
new file mode 100644
index 000000000000..3fc3a441ac34
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/polkit-kde-agent.nix
@@ -0,0 +1,31 @@
+{ plasmaPackage
+, extra-cmake-modules
+, ki18n
+, kwindowsystem
+, kdbusaddons
+, kwidgetsaddons
+, kcoreaddons
+, kcrash
+, kconfig
+, kiconthemes
+, knotifications
+, polkit-qt
+}:
+
+plasmaPackage {
+  name = "polkit-kde-agent";
+  nativeBuildInputs = [
+    extra-cmake-modules
+  ];
+  buildInputs = [
+    kdbusaddons
+    kwidgetsaddons
+    kcoreaddons
+    kcrash
+    kconfig
+    kiconthemes
+    knotifications
+    polkit-qt
+  ];
+  propagatedBuildInputs = [ ki18n kwindowsystem ];
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/powerdevil.nix b/pkgs/desktops/kde-5/plasma-5.5/powerdevil.nix
new file mode 100644
index 000000000000..475e8878206a
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/powerdevil.nix
@@ -0,0 +1,20 @@
+{ plasmaPackage, extra-cmake-modules, kdoctools, kactivities
+, kauth, kconfig, kdbusaddons, kdelibs4support, kglobalaccel, ki18n
+, kidletime, kio, knotifyconfig, kwayland, libkscreen, plasma-workspace
+, qtx11extras, solid, udev
+}:
+
+plasmaPackage {
+  name = "powerdevil";
+  nativeBuildInputs = [
+    extra-cmake-modules
+    kdoctools
+  ];
+  buildInputs = [
+    kconfig kdbusaddons knotifyconfig solid udev
+  ];
+  propagatedBuildInputs = [
+    kactivities kauth kdelibs4support kglobalaccel ki18n kio kidletime
+    kwayland libkscreen plasma-workspace qtx11extras
+  ];
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/srcs.nix b/pkgs/desktops/kde-5/plasma-5.5/srcs.nix
new file mode 100644
index 000000000000..3b63c864045d
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/srcs.nix
@@ -0,0 +1,309 @@
+# DO NOT EDIT! This file is generated automatically by fetchsrcs.sh
+{ fetchurl, mirror }:
+
+{
+  bluedevil = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/bluedevil-5.5.4.tar.xz";
+      sha256 = "1r20dlsg83d3lrnbdb92cpd7h0s2fmh0vjv3xi5z6rf741463p14";
+      name = "bluedevil-5.5.4.tar.xz";
+    };
+  };
+  breeze = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/breeze-5.5.4.tar.xz";
+      sha256 = "0chlp5z5zz19rh9k4ffjr92hn07dmavfcwx0wwffy8qhiw6qw7w3";
+      name = "breeze-5.5.4.tar.xz";
+    };
+  };
+  breeze-gtk = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/breeze-gtk-5.5.4.tar.xz";
+      sha256 = "1r6ihmpgha1s4hvgr4jliqvbraw06fnaa4sjrhzqbx9dh00y5d8v";
+      name = "breeze-gtk-5.5.4.tar.xz";
+    };
+  };
+  discover = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/discover-5.5.4.tar.xz";
+      sha256 = "0d5s8b9f5az40ajviijc67rz5l2345wlrqacjm4pdi8fqvxivb1v";
+      name = "discover-5.5.4.tar.xz";
+    };
+  };
+  kde-cli-tools = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/kde-cli-tools-5.5.4.tar.xz";
+      sha256 = "1w9l8lh05k6xjdz0nccfygp76lp3wf3xa6pizmgv27wq21pw4wxy";
+      name = "kde-cli-tools-5.5.4.tar.xz";
+    };
+  };
+  kdecoration = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/kdecoration-5.5.4.tar.xz";
+      sha256 = "1ghgvg0lfjjlgl3a9ryw1y8aqihdwrkr7qjph4v3p9brlpqm5326";
+      name = "kdecoration-5.5.4.tar.xz";
+    };
+  };
+  kde-gtk-config = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/kde-gtk-config-5.5.4.tar.xz";
+      sha256 = "062jgc2sqd93yz5n1z4n7h50k7zsiayi3z901y2rq0x62nndff1m";
+      name = "kde-gtk-config-5.5.4.tar.xz";
+    };
+  };
+  kdeplasma-addons = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/kdeplasma-addons-5.5.4.tar.xz";
+      sha256 = "0yrrjkh632q3ns068j7avaf2rkn2n54sf594jyl30q5fxc22mhq1";
+      name = "kdeplasma-addons-5.5.4.tar.xz";
+    };
+  };
+  kgamma5 = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/kgamma5-5.5.4.tar.xz";
+      sha256 = "0w63m1sxq2fa0wabyyry4prbzc2c54adc56hfhkh84rflccfbnc2";
+      name = "kgamma5-5.5.4.tar.xz";
+    };
+  };
+  khelpcenter = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/khelpcenter-5.5.4.tar.xz";
+      sha256 = "01kw97p1xz2gghghykkv953bvypcyd080fxknjrzn4v9gl5mrjv0";
+      name = "khelpcenter-5.5.4.tar.xz";
+    };
+  };
+  khotkeys = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/khotkeys-5.5.4.tar.xz";
+      sha256 = "1jlpzqrww2n9zf5cwlvpyvxcz0wv0cyln1xjhm49ayl5iin3m9yn";
+      name = "khotkeys-5.5.4.tar.xz";
+    };
+  };
+  kinfocenter = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/kinfocenter-5.5.4.tar.xz";
+      sha256 = "10qhq76ha1mahpmgrj4kw660zf92k7ys3mz2dkiid7ib6gsimir4";
+      name = "kinfocenter-5.5.4.tar.xz";
+    };
+  };
+  kmenuedit = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/kmenuedit-5.5.4.tar.xz";
+      sha256 = "0scsr3isf4d0hlk85pk0snn6j5cwm7qlqnl6iqs0df32g8ysirs6";
+      name = "kmenuedit-5.5.4.tar.xz";
+    };
+  };
+  kscreen = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/kscreen-5.5.4.tar.xz";
+      sha256 = "0ax67gqfjw59jk3wh3sflk3q10xqrjwf2qmvx6jky6q2x4kdixvv";
+      name = "kscreen-5.5.4.tar.xz";
+    };
+  };
+  kscreenlocker = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/kscreenlocker-5.5.4.tar.xz";
+      sha256 = "18r53f5vri8xaj53zskadnxqxs60akxmwkq54xnb4lvg5cks9hrr";
+      name = "kscreenlocker-5.5.4.tar.xz";
+    };
+  };
+  ksshaskpass = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/ksshaskpass-5.5.4.tar.xz";
+      sha256 = "0hlgf7896qksivmf79ks0xcqndjvmmq13ywrkc0l43pcj50ydhj2";
+      name = "ksshaskpass-5.5.4.tar.xz";
+    };
+  };
+  ksysguard = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/ksysguard-5.5.4.tar.xz";
+      sha256 = "1hbq8ppz9ijkk032aldrxyfwk1yrpjchfy6w6mg836bi8f69i1kc";
+      name = "ksysguard-5.5.4.tar.xz";
+    };
+  };
+  kwallet-pam = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/kwallet-pam-5.5.4.tar.xz";
+      sha256 = "0cj9iq7ba24lccgj3h4fpa97bcm3lw3yz43hfhldiwdkzl1pydhl";
+      name = "kwallet-pam-5.5.4.tar.xz";
+    };
+  };
+  kwayland = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/kwayland-5.5.4.tar.xz";
+      sha256 = "1cprg187h8pny86910m08pzyvknbcqa9x3xbqh7flrpw0rvrg5wp";
+      name = "kwayland-5.5.4.tar.xz";
+    };
+  };
+  kwayland-integration = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/kwayland-integration-5.5.4.tar.xz";
+      sha256 = "07vv7gjqgmgn766p6nifn2i835rdhs6kvp24a5fqnh8ad24m8fjy";
+      name = "kwayland-integration-5.5.4.tar.xz";
+    };
+  };
+  kwin = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/kwin-5.5.4.tar.xz";
+      sha256 = "1015a0d3yi5b4isfkrl3w3mdslh0r1xyhvy9z8liz3wnxgrajwj8";
+      name = "kwin-5.5.4.tar.xz";
+    };
+  };
+  kwrited = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/kwrited-5.5.4.tar.xz";
+      sha256 = "01d8q3hj5frhmafsavgvyz2nlbd4ma4fsx12dhjyxqsgxdvvgffh";
+      name = "kwrited-5.5.4.tar.xz";
+    };
+  };
+  libkscreen = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/libkscreen-5.5.4.tar.xz";
+      sha256 = "15q7x844x8cz15b3mkh4lwygvrx66s0fl706b221p3my54n63ymf";
+      name = "libkscreen-5.5.4.tar.xz";
+    };
+  };
+  libksysguard = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/libksysguard-5.5.4.tar.xz";
+      sha256 = "1irrb3im0gr8yhkp570bqipbqz8igpxr2k4kxb2c04111npkqmw1";
+      name = "libksysguard-5.5.4.tar.xz";
+    };
+  };
+  milou = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/milou-5.5.4.tar.xz";
+      sha256 = "0dc8jbk0yihqv5jxd4i12rmvfyyp63b6hx9q22qjrj5gkda1cddl";
+      name = "milou-5.5.4.tar.xz";
+    };
+  };
+  oxygen = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/oxygen-5.5.4.tar.xz";
+      sha256 = "10fjwk1aznpkrnal961kfwpjjil2iy2n0x96h26bh91l4insix1v";
+      name = "oxygen-5.5.4.tar.xz";
+    };
+  };
+  plasma-desktop = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/plasma-desktop-5.5.4.tar.xz";
+      sha256 = "0lkjgbqinxy40w6z01akpihljqpm7bachmxqmcp6fjnzawql2xqd";
+      name = "plasma-desktop-5.5.4.tar.xz";
+    };
+  };
+  plasma-mediacenter = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/plasma-mediacenter-5.5.4.tar.xz";
+      sha256 = "1rn7qffd11dljx1il7cw74wbqf4lwmmlcv19yxj08fdrp5ylqr8a";
+      name = "plasma-mediacenter-5.5.4.tar.xz";
+    };
+  };
+  plasma-nm = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/plasma-nm-5.5.4.tar.xz";
+      sha256 = "0bjfcsavrqx4i4c0ynfmdna7fnmabm8970h3dnx7ihwsqgjf5q31";
+      name = "plasma-nm-5.5.4.tar.xz";
+    };
+  };
+  plasma-pa = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/plasma-pa-5.5.4.tar.xz";
+      sha256 = "0d1cdixgxa2vsgv47hinh5nsbf2bln3ppdlrnzz9vglian0z7879";
+      name = "plasma-pa-5.5.4.tar.xz";
+    };
+  };
+  plasma-sdk = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/plasma-sdk-5.5.4.tar.xz";
+      sha256 = "0fdx4f8z00276s1p1v1bkbrhy59jswk2dj8kcj96r2rk3xzcg0ax";
+      name = "plasma-sdk-5.5.4.tar.xz";
+    };
+  };
+  plasma-workspace = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/plasma-workspace-5.5.4.tar.xz";
+      sha256 = "0zh96qq0nl1c6bni7vnciba548f3cjacsi06n2rv05356j1fp87h";
+      name = "plasma-workspace-5.5.4.tar.xz";
+    };
+  };
+  plasma-workspace-wallpapers = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/plasma-workspace-wallpapers-5.5.4.tar.xz";
+      sha256 = "0p111f95di11k4v19c1mg694c71825najmi8dzj2qrif5sb2vvsn";
+      name = "plasma-workspace-wallpapers-5.5.4.tar.xz";
+    };
+  };
+  polkit-kde-agent = {
+    version = "1-5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/polkit-kde-agent-1-5.5.4.tar.xz";
+      sha256 = "116sj9s45n3qcgfsdz5hh6a73b0hldgcnxbpvi4320xpny316vh2";
+      name = "polkit-kde-agent-1-5.5.4.tar.xz";
+    };
+  };
+  powerdevil = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/powerdevil-5.5.4.tar.xz";
+      sha256 = "0i0i55g72yb9z8agv1yyrx98l3s0fs5wn51kz571vqqrw6m3wn7l";
+      name = "powerdevil-5.5.4.tar.xz";
+    };
+  };
+  sddm-kcm = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/sddm-kcm-5.5.4.tar.xz";
+      sha256 = "04vh4f2hg5584acb5ywf1i8z6lvz0fcs7zh085bm7pkx5l60l59b";
+      name = "sddm-kcm-5.5.4.tar.xz";
+    };
+  };
+  systemsettings = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/systemsettings-5.5.4.tar.xz";
+      sha256 = "1i7ljxsnwf2kwd05kzxirbyaxj3w5kyr0jq9j0iy3jlz97p4jkpv";
+      name = "systemsettings-5.5.4.tar.xz";
+    };
+  };
+  user-manager = {
+    version = "5.5.4";
+    src = fetchurl {
+      url = "${mirror}/stable/plasma/5.5.4/user-manager-5.5.4.tar.xz";
+      sha256 = "17lki4y77rq1n100p74q4n6sm3l5dxvv996wf4w1j2n2aiw89p4j";
+      name = "user-manager-5.5.4.tar.xz";
+    };
+  };
+}
diff --git a/pkgs/desktops/kde-5/plasma-5.5/systemsettings.nix b/pkgs/desktops/kde-5/plasma-5.5/systemsettings.nix
new file mode 100644
index 000000000000..a921e153dbc2
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma-5.5/systemsettings.nix
@@ -0,0 +1,21 @@
+{ plasmaPackage, extra-cmake-modules, kdoctools, kitemviews
+, kcmutils, ki18n, kio, kservice, kiconthemes, kwindowsystem
+, kxmlgui, kdbusaddons, kconfig, khtml, makeQtWrapper
+}:
+
+plasmaPackage {
+  name = "systemsettings";
+  nativeBuildInputs = [
+    extra-cmake-modules
+    kdoctools
+    makeQtWrapper
+  ];
+  buildInputs = [
+    kitemviews kcmutils kservice kiconthemes kxmlgui kdbusaddons
+    kconfig
+  ];
+  propagatedBuildInputs = [ khtml ki18n kio kwindowsystem ];
+  postInstall = ''
+    wrapQtProgram "$out/bin/systemsettings5"
+  '';
+}