summary refs log tree commit diff
path: root/pkgs/desktops
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@gmail.com>2015-04-19 20:50:03 -0500
committerThomas Tuegel <ttuegel@gmail.com>2015-04-19 20:50:03 -0500
commitcefdbbcfb8034eeb6d4da41b5de0064fecdd7023 (patch)
treeb95282537bff9f00198dc87caa0c768358005b8c /pkgs/desktops
parent0444e9266c21bb71fe554f3f4a630285e8bb51bf (diff)
downloadnixlib-cefdbbcfb8034eeb6d4da41b5de0064fecdd7023.tar
nixlib-cefdbbcfb8034eeb6d4da41b5de0064fecdd7023.tar.gz
nixlib-cefdbbcfb8034eeb6d4da41b5de0064fecdd7023.tar.bz2
nixlib-cefdbbcfb8034eeb6d4da41b5de0064fecdd7023.tar.lz
nixlib-cefdbbcfb8034eeb6d4da41b5de0064fecdd7023.tar.xz
nixlib-cefdbbcfb8034eeb6d4da41b5de0064fecdd7023.tar.zst
nixlib-cefdbbcfb8034eeb6d4da41b5de0064fecdd7023.zip
add plasma-5.2.95
Diffstat (limited to 'pkgs/desktops')
-rw-r--r--pkgs/desktops/plasma-5.3/default.nix166
-rw-r--r--pkgs/desktops/plasma-5.3/dependencies.nix300
-rwxr-xr-xpkgs/desktops/plasma-5.3/dependencies.sh22
-rw-r--r--pkgs/desktops/plasma-5.3/kwin/kwin-import-plugin-follow-symlinks.patch13
-rw-r--r--pkgs/desktops/plasma-5.3/kwin/libinput-0.8.patch25
-rw-r--r--pkgs/desktops/plasma-5.3/libkscreen/libkscreen-backend-path.patch130
-rw-r--r--pkgs/desktops/plasma-5.3/manifest.nix337
-rwxr-xr-xpkgs/desktops/plasma-5.3/manifest.sh9
-rw-r--r--pkgs/desktops/plasma-5.3/plasma-desktop/plasma-desktop-hwclock.patch24
-rw-r--r--pkgs/desktops/plasma-5.3/plasma-desktop/plasma-desktop-zoneinfo.patch18
-rw-r--r--pkgs/desktops/plasma-5.3/renames.nix23
-rw-r--r--pkgs/desktops/plasma-5.3/setup-hook.sh1
-rw-r--r--pkgs/desktops/plasma-5.3/startkde/default.nix34
-rw-r--r--pkgs/desktops/plasma-5.3/startkde/kdeglobals11
-rw-r--r--pkgs/desktops/plasma-5.3/startkde/startkde.in374
-rw-r--r--pkgs/desktops/plasma-5.3/startkde/startupconfigkeys5
16 files changed, 1492 insertions, 0 deletions
diff --git a/pkgs/desktops/plasma-5.3/default.nix b/pkgs/desktops/plasma-5.3/default.nix
new file mode 100644
index 000000000000..ed89384e26ac
--- /dev/null
+++ b/pkgs/desktops/plasma-5.3/default.nix
@@ -0,0 +1,166 @@
+# Maintainer's Notes:
+#
+# Minor updates:
+#  1. Edit ./manifest.sh to point to the updated URL. Upstream sometimes
+#     releases updates that include only the changed packages; in this case,
+#     multiple URLs can be provided and the results will be merged.
+#  2. Run ./manifest.sh and ./dependencies.sh.
+#  3. Build and enjoy.
+#
+# Major updates:
+#  We prefer not to immediately overwrite older versions with major updates, so
+#  make a copy of this directory first. After copying, be sure to delete ./tmp
+#  if it exists. Then follow the minor update instructions.
+
+{ autonix, kf5, pkgs, qt5, stdenv, debug ? false }:
+
+with stdenv.lib; with autonix;
+
+let kf5Orig = kf5; in
+
+let
+
+  kf5 = kf5Orig.override { inherit debug qt5; };
+
+  mirror = "mirror://kde";
+
+  renames =
+    builtins.removeAttrs
+      (import ./renames.nix {})
+      ["Backend" "CTest"];
+
+  scope =
+    # packages in this collection
+    (mapAttrs (dep: name: plasma5."${name}") renames) //
+    # packages from KDE Frameworks 5
+    kf5.scope //
+    # packages pinned to this version of Qt 5
+    {
+      LibBlueDevil = pkgs.libbluedevil;
+      PolkitQt5-1 = pkgs.polkit_qt5.override { inherit qt5; };
+      PopplerQt5 = pkgs.poppler_qt5.override { inherit qt5; };
+    } //
+    # packages from nixpkgs
+    (with pkgs;
+      {
+        inherit epoxy;
+        Epub = ebook_tools;
+        Exiv2 = exiv2;
+        FFmpeg = ffmpeg;
+        FONTFORGE_EXECUTABLE = fontforge;
+        Freetype = freetype;
+        GTK2 = gtk2;
+        GTK3 = gtk3;
+        Libinput = libinput;
+        LibSSH = libssh;
+        PulseAudio = pulseaudio;
+        Taglib = taglib;
+        USB = libusb;
+        Wayland = wayland;
+        Xapian = xapian;
+      }
+    );
+
+  preResolve = super:
+    fold (f: x: f x) super
+      [
+        (userEnvPkg "SharedMimeInfo")
+        (userEnvPkg "SharedDesktopOntologies")
+        (blacklist ["bluedevil"])
+      ];
+
+  postResolve = super:
+    (builtins.removeAttrs super ["breeze"]) // {
+
+      breeze-qt4 = with pkgs; super.breeze // {
+        name = "breeze-qt4-" + (builtins.parseDrvName super.breeze.name).version;
+        buildInputs = [ xlibs.xproto kde4.kdelibs qt4 ];
+        nativeBuildInputs = [ cmake pkgconfig ];
+        cmakeFlags =
+          [
+            "-DUSE_KDE4=ON"
+            "-DQT_QMAKE_EXECUTABLE=${qt4}/bin/qmake"
+          ];
+      };
+
+      breeze-qt5 = with pkgs; super.breeze // {
+        name = "breeze-qt5-" + (builtins.parseDrvName super.breeze.name).version;
+        buildInputs = with kf5; with plasma5;
+          [
+            kcompletion kconfig kconfigwidgets kcoreaddons kdecoration kguiaddons
+            frameworkintegration ki18n kwindowsystem qt5.base qt5.x11extras
+          ];
+        nativeBuildInputs = [ cmake kf5.extra-cmake-modules pkgconfig ];
+        cmakeFlags = [ "-DUSE_KDE4=OFF" ];
+      };
+
+      kde-gtk-config = with pkgs; super.kde-gtk-config // {
+        NIX_CFLAGS_COMPILE =
+          (super.kde-gtk-config.NIX_CFLAGS_COMPILE or "")
+          + " -I${cairo}/include/cairo"
+          + " -I${gtk2}/include/gtk-2.0 -I${gtk2}/lib/gtk-2.0/include"
+          + " -I${glib}/include/glib-2.0 -I${glib}/lib/glib-2.0/include"
+          + " -I${pango}/include/pango-1.0";
+      };
+
+      kwin = with pkgs; super.kwin // {
+        buildInputs = with xlibs;
+          super.kwin.buildInputs ++ [ libICE libSM libXcursor ];
+        patches = [ ./kwin/kwin-import-plugin-follow-symlinks.patch ];
+      };
+
+      libkscreen = with pkgs; super.libkscreen // {
+        buildInputs = with xlibs; super.libkscreen.buildInputs ++ [libXrandr];
+      };
+
+      plasma-desktop = with pkgs; super.plasma-desktop // {
+        buildInputs = with xlibs;
+          super.plasma-desktop.buildInputs ++
+          [ pkgs.libcanberra libxkbfile libXcursor libXft ];
+        patches = [
+          ./plasma-desktop/plasma-desktop-hwclock.patch
+          ./plasma-desktop/plasma-desktop-zoneinfo.patch
+        ];
+        preConfigure = ''
+          substituteInPlace kcms/dateandtime/helper.cpp \
+            --subst-var-by hwclock "${utillinux}/sbin/hwclock"
+        '';
+      };
+
+      plasma-workspace = with pkgs; super.plasma-workspace // {
+        buildInputs = with xlibs;
+          super.plasma-workspace.buildInputs ++ [ libSM libXcursor pam ];
+        postPatch = ''
+          substituteInPlace startkde/kstartupconfig/kstartupconfig.cpp \
+            --replace kdostartupconfig5 $out/bin/kdostartupconfig5
+        '';
+        postInstall = ''
+          # We use a custom startkde script
+          rm $out/bin/startkde
+        '';
+      };
+
+      powerdevil = with pkgs; super.powerdevil // {
+        buildInputs = with xlibs; super.powerdevil.buildInputs ++ [libXrandr];
+      };
+
+      sddm-kcm = with pkgs; super.sddm-kcm // {
+        buildInputs = with xlibs; super.sddm-kcm.buildInputs ++ [libXcursor];
+      };
+
+    };
+
+  plasma5 = generateCollection ./. {
+    inherit (kf5) mkDerivation;
+    inherit mirror preResolve postResolve renames scope;
+  };
+
+in
+  plasma5 // {
+    inherit kf5 scope;
+    startkde = pkgs.callPackage ./startkde {
+      inherit (kf5) kconfig kinit kservice;
+      inherit (plasma5) plasma-desktop plasma-workspace;
+      inherit qt5;
+    };
+  }
diff --git a/pkgs/desktops/plasma-5.3/dependencies.nix b/pkgs/desktops/plasma-5.3/dependencies.nix
new file mode 100644
index 000000000000..3a813402f2ce
--- /dev/null
+++ b/pkgs/desktops/plasma-5.3/dependencies.nix
@@ -0,0 +1,300 @@
+# DO NOT EDIT! This file is generated automatically.
+{ }:
+{
+  baloo = {
+    buildInputs = [ "ECM" "KF5" "KF5Auth" "KF5Config" "KF5Crash" "KF5DBusAddons" "KF5FileMetaData" "KF5I18n" "KF5IdleTime" "KF5KDELibs4Support" "KF5KIO" "KF5Solid" "Qt5" "Qt5DBus" "Qt5NO_MODULE" "Qt5Quick" "Qt5Sql" "Qt5Test" "Qt5Widgets" "Xapian" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [ "KF5CoreAddons" "KF5FileMetaData" "Qt5Core" "Xapian" ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  bluedevil = {
+    buildInputs = [ "ECM" "KDED" "KF5" "KF5BluezQt" "KF5CoreAddons" "KF5DBusAddons" "KF5I18n" "KF5IconThemes" "KF5KIO" "KF5MODULE" "KF5Notifications" "KF5Plasma" "KF5WidgetsAddons" "Qt5" "Qt5Core" "Qt5DBus" "Qt5Qml" "Qt5Widgets" "SharedMimeInfo" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [ "SharedMimeInfo" ];
+  };
+
+  bluez-qt = {
+    buildInputs = [ "ECM" "Qt5" "Qt5Core" "Qt5DBus" "Qt5Network" "Qt5Qml" "Qt5QuickTest" "Qt5Test" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [ "Qt5Core" ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  breeze = {
+    buildInputs = [ "ECM" "KDE4" "KDecoration2" "KF5" "KF5Config" "KF5ConfigWidgets" "KF5CoreAddons" "KF5FrameworkIntegration" "KF5GuiAddons" "KF5I18n" "KF5KCMUtils" "KF5WindowSystem" "PkgConfig" "Qt5" "Qt5Core" "Qt5DBus" "Qt5Widgets" "Qt5X11Extras" "XCB" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  kde-cli-tools = {
+    buildInputs = [ "ECM" "KF5" "KF5Config" "KF5I18n" "KF5IconThemes" "KF5KCMUtils" "KF5KDELibs4Support" "KF5Su" "KF5WindowSystem" "Qt5" "Qt5DBus" "Qt5QUIET" "Qt5Svg" "Qt5Test" "Qt5Widgets" "Qt5X11Extras" "X11" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  kde-gtk-config = {
+    buildInputs = [ "ECM" "GTK2" "GTK3" "KF5" "KF5Archive" "KF5ConfigWidgets" "KF5I18n" "KF5IconThemes" "KF5KCMUtils" "KF5KIO" "KF5NewStuff" "Qt5" "Qt5NO_MODULE" "Qt5Network" "Qt5Test" "Qt5Widgets" "X11" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  kdecoration = {
+    buildInputs = [ "ECM" "Qt5" "Qt5Core" "Qt5Gui" "Qt5Test" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [ "Qt5Gui" ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  kdeplasma-addons = {
+    buildInputs = [ "ECM" "GIO" "GLIB2" "GObject" "IBus" "KDE4" "KF5" "KF5Config" "KF5ConfigWidgets" "KF5CoreAddons" "KF5I18n" "KF5KCMUtils" "KF5KDELibs4Support" "KF5KIO" "KF5Kross" "KF5NewStuff" "KF5Plasma" "KF5Purpose" "KF5QUIET" "KF5Runner" "KF5Service" "KF5UnitConversion" "KdepimLibs" "Kexiv2" "Lancelot" "Lancelot-Datamodels" "Qt5" "Qt5Core" "Qt5DBus" "Qt5Gui" "Qt5Qml" "Qt5Quick" "Qt5Widgets" "Qt5X11Extras" "SCIM" "SharedMimeInfo" "X11" "XCB" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [ "SharedMimeInfo" ];
+  };
+
+  kfilemetadata = {
+    buildInputs = [ "ECM" "EPub" "Exiv2" "FFmpeg" "KF5" "KF5Archive" "KF5I18n" "PopplerQt5" "QMobipocket" "Qt5" "Qt5NO_MODULE" "Qt5Test" "Qt5Xml" "Taglib" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [ "Qt5Core" ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  khelpcenter = {
+    buildInputs = [ "ECM" "KF5" "KF5Config" "KF5I18n" "KF5Init" "KF5KCMUtils" "KF5KDELibs4Support" "KF5KHtml" "Qt5" "Qt5DBus" "Qt5Widgets" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  khotkeys = {
+    buildInputs = [ "ECM" "KF5" "KF5DBusAddons" "KF5GlobalAccel" "KF5I18n" "KF5KCMUtils" "KF5KDELibs4Support" "KF5KIO" "KF5Plasma" "KF5XmlGui" "LibKWorkspace" "Qt5" "Qt5X11Extras" "X11" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  kinfocenter = {
+    buildInputs = [ "ECM" "EGL" "KF5" "KF5Completion" "KF5Config" "KF5ConfigWidgets" "KF5CoreAddons" "KF5DBusAddons" "KF5Declarative" "KF5DocTools" "KF5I18n" "KF5IconThemes" "KF5KCMUtils" "KF5KDELibs4Support" "KF5KIO" "KF5Package" "KF5Service" "KF5Solid" "KF5Wayland" "KF5WidgetsAddons" "KF5XmlGui" "OpenGL" "OpenGLES" "PCIUTILS" "Qt5" "Qt5Core" "Qt5Gui" "Qt5Widgets" "RAW1394" "X11" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  kio-extras = {
+    buildInputs = [ "ECM" "Exiv2" "JPEG" "KF5" "KF5Archive" "KF5Bookmarks" "KF5Config" "KF5ConfigWidgets" "KF5CoreAddons" "KF5DBusAddons" "KF5DNSSD" "KF5DocTools" "KF5GuiAddons" "KF5I18n" "KF5IconThemes" "KF5KDELibs4Support" "KF5KHtml" "KF5KIO" "KF5Pty" "KF5Solid" "LibSSH" "Mtp" "OpenEXR" "Phonon4Qt5" "Qt5" "Qt5DBus" "Qt5Network" "Qt5QUIET" "Qt5Svg" "Qt5Test" "Qt5Widgets" "SLP" "Samba" "SharedMimeInfo" ];
+    nativeBuildInputs = [ "MD5SUM_EXECUTABLE" "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [ "SharedMimeInfo" ];
+  };
+
+  kmenuedit = {
+    buildInputs = [ "ECM" "KF5" "KF5DBusAddons" "KF5I18n" "KF5IconThemes" "KF5KDELibs4Support" "KF5KIO" "KF5Sonnet" "KF5XmlGui" "KHotKeysDBusInterface" "Qt5" "Qt5Core" "Qt5DBus" "Qt5Xml" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  kscreen = {
+    buildInputs = [ "ECM" "KF5" "KF5ConfigWidgets" "KF5DBusAddons" "KF5GlobalAccel" "KF5I18n" "KF5Screen" "KF5XmlGui" "Qt5" "Qt5QuickWidgets" "Qt5Test" "Qt5X11Extras" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  ksshaskpass = {
+    buildInputs = [ "ECM" "KF5" "KF5CoreAddons" "KF5DocTools" "KF5I18n" "KF5Wallet" "KF5WidgetsAddons" "Qt5" "Qt5Core" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  ksysguard = {
+    buildInputs = [ "ECM" "KF5" "KF5Config" "KF5CoreAddons" "KF5I18n" "KF5IconThemes" "KF5ItemViews" "KF5KDELibs4Support" "KF5NewStuff" "KF5SysGuard" "Qt5" "Qt5Core" "Qt5Widgets" "Sensors" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  kwayland = {
+    buildInputs = [ "ECM" "EGL" "Qt5" "Qt5COMPONENT" "Qt5Concurrent" "Qt5Core" "Qt5Gui" "Qt5Private" "Qt5QUIET" "Qt5Test" "Qt5Widgets" "Qt5_check_private" "Wayland" "WaylandScanner" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [ "Qt5Gui" ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  kwin = {
+    buildInputs = [ "ECM" "EGL" "KDecoration2" "KF5" "KF5Activities" "KF5Completion" "KF5Config" "KF5ConfigWidgets" "KF5CoreAddons" "KF5Crash" "KF5Declarative" "KF5DocTools" "KF5GlobalAccel" "KF5I18n" "KF5IconThemes" "KF5Init" "KF5KCMUtils" "KF5KIO" "KF5NewStuff" "KF5Notifications" "KF5Plasma" "KF5Service" "KF5Wayland" "KF5WidgetsAddons" "KF5WindowSystem" "KF5XmlGui" "Libinput" "Qt5" "Qt5Concurrent" "Qt5Core" "Qt5DBus" "Qt5Multimedia" "Qt5QUIET" "Qt5Quick" "Qt5QuickWidgets" "Qt5Script" "Qt5Test" "Qt5UiTools" "Qt5Widgets" "Qt5X11Extras" "Threads" "UDev" "Wayland" "X11" "X11_XCB" "XCB" "XKB" "epoxy" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  kwrited = {
+    buildInputs = [ "ECM" "KF5" "KF5CoreAddons" "KF5DBusAddons" "KF5I18n" "KF5Notifications" "KF5Pty" "Qt5" "Qt5Widgets" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  libkscreen = {
+    buildInputs = [ "Doxygen" "ECM" "Qt5" "Qt5Core" "Qt5DBus" "Qt5Gui" "Qt5Test" "Qt5X11Extras" "XCB" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [ "Qt5Core" ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  libksysguard = {
+    buildInputs = [ "ECM" "KF5" "KF5Auth" "KF5Completion" "KF5Config" "KF5ConfigWidgets" "KF5CoreAddons" "KF5I18n" "KF5IconThemes" "KF5Plasma" "KF5Service" "KF5WidgetsAddons" "KF5WindowSystem" "Qt5" "Qt5DBus" "Qt5Network" "Qt5Script" "Qt5Test" "Qt5WebKitWidgets" "Qt5Widgets" "Qt5X11Extras" "X11" "ZLIB" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [ "KF5Config" "KF5I18n" "KF5IconThemes" "Qt5Core" "Qt5Network" "Qt5Widgets" ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  milou = {
+    buildInputs = [ "ECM" "KF5" "KF5CoreAddons" "KF5Declarative" "KF5I18n" "KF5Plasma" "KF5Runner" "KF5Service" "KdepimLibs" "Qt5" "Qt5NO_MODULE" "Qt5Qml" "Qt5Quick" "Qt5Script" "Qt5Test" "Qt5Widgets" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  muon = {
+    buildInputs = [ "AkabeiClient" "AppstreamQt" "BODEGA" "DebconfKDE" "ECM" "KF5" "KF5Attica" "KF5Config" "KF5ConfigWidgets" "KF5CoreAddons" "KF5DBusAddons" "KF5Declarative" "KF5I18n" "KF5IconThemes" "KF5ItemViews" "KF5KDELibs4Support" "KF5KIO" "KF5NewStuff" "KF5Notifications" "KF5Plasma" "KF5Solid" "KF5Wallet" "KF5WidgetsAddons" "Phonon4Qt5" "QApt" "Qca-qt5" "Qt5" "Qt5Concurrent" "Qt5DBus" "Qt5Network" "Qt5Qml" "Qt5QuickWidgets" "Qt5Svg" "Qt5Test" "Qt5Widgets" "Qt5Xml" "QtOAuth" "packagekitqt5" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  oxygen = {
+    buildInputs = [ "ECM" "KDE4" "KDE4Workspace" "KDecoration2" "KF5" "KF5Completion" "KF5Config" "KF5ConfigWidgets" "KF5CoreAddons" "KF5FrameworkIntegration" "KF5GuiAddons" "KF5I18n" "KF5Service" "KF5WidgetsAddons" "KF5WindowSystem" "PkgConfig" "Qt5" "Qt5DBus" "Qt5Widgets" "Qt5X11Extras" "XCB" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  oxygen-fonts = {
+    buildInputs = [ "ECM" ];
+    nativeBuildInputs = [ "FONTFORGE_EXECUTABLE" "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  plasma-desktop = {
+    buildInputs = [ "Boost" "Canberra" "ECM" "Fontconfig" "Freetype" "GLIB2" "KDE4" "KF5" "KF5Activities" "KF5Attica" "KF5Auth" "KF5Baloo" "KF5Config" "KF5CoreAddons" "KF5DBusAddons" "KF5Declarative" "KF5DocTools" "KF5Emoticons" "KF5GlobalAccel" "KF5GuiAddons" "KF5I18n" "KF5ItemModels" "KF5KCMUtils" "KF5KDELibs4Support" "KF5KIO" "KF5NewStuff" "KF5Notifications" "KF5NotifyConfig" "KF5People" "KF5Plasma" "KF5PlasmaQuick" "KF5Runner" "KF5Wallet" "KRunnerAppDBusInterface" "KSMServerDBusInterface" "KWinDBusInterface" "LibKWorkspace" "LibTaskManager" "OpenGL" "OpenGLES" "PackageKitQt5" "Phonon4Qt5" "PulseAudio" "Qt4" "Qt5" "Qt5Concurrent" "Qt5DBus" "Qt5NO_MODULE" "Qt5Qml" "Qt5Quick" "Qt5QuickWidgets" "Qt5Sql" "Qt5Svg" "Qt5Test" "Qt5Widgets" "Qt5X11Extras" "ScreenSaverDBusInterface" "Strigi" "Synaptics" "USB" "X11" "XCB" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [ "Qt5Core" ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  plasma-mediacenter = {
+    buildInputs = [ "ECM" "KF5" "KF5Baloo" "KF5Config" "KF5ConfigWidgets" "KF5CoreAddons" "KF5Declarative" "KF5FileMetaData" "KF5GuiAddons" "KF5I18n" "KF5KIO" "KF5Plasma" "KF5PlasmaQuick" "KF5Service" "KF5WindowSystem" "Qt5" "Qt5Core" "Qt5DBus" "Qt5Multimedia" "Qt5QUIET" "Qt5Quick" "Qt5Sql" "Qt5Test" "Qt5Xml" "Taglib" "mockcpp" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  plasma-nm = {
+    buildInputs = [ "ECM" "KF5" "KF5Completion" "KF5ConfigWidgets" "KF5CoreAddons" "KF5DBusAddons" "KF5Declarative" "KF5I18n" "KF5IconThemes" "KF5Init" "KF5ItemViews" "KF5KDELibs4Support" "KF5KIO" "KF5ModemManagerQt" "KF5NetworkManagerQt" "KF5Notifications" "KF5Plasma" "KF5Service" "KF5Solid" "KF5Wallet" "KF5WidgetsAddons" "KF5WindowSystem" "KF5XmlGui" "MobileBroadbandProviderInfo" "ModemManager" "NetworkManager" "OpenConnect" "OpenSSL" "Qt5" "Qt5Core" "Qt5DBus" "Qt5Network" "Qt5Quick" "Qt5Widgets" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  plasma-sdk = {
+    buildInputs = [ "ActiveApp" "ECM" "KDevPlatform" "KF5" "KF5Archive" "KF5Completion" "KF5Config" "KF5ConfigWidgets" "KF5CoreAddons" "KF5Declarative" "KF5I18n" "KF5IconThemes" "KF5KDELibs4Support" "KF5KIO" "KF5NewStuff" "KF5Parts" "KF5Plasma" "KF5PlasmaQuick" "KF5Service" "KF5TextEditor" "KF5WidgetsAddons" "KF5WindowSystem" "KF5XmlGui" "KdepimLibs" "QGpgme" "Qt5" "Qt5Core" "Qt5DBus" "Qt5Gui" "Qt5NO_MODULE" "Qt5QUIET" "Qt5Qml" "Qt5Quick" "Qt5Svg" "Qt5Test" "Qt5WebKit" "Qt5WebKitWidgets" "Qt5Widgets" "Qt5Xml" ];
+    nativeBuildInputs = [ "GIT_EXECUTABLE_FOUND" "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  plasma-workspace = {
+    buildInputs = [ "ECM" "KF5" "KF5Activities" "KF5Baloo" "KF5Config" "KF5CoreAddons" "KF5Crash" "KF5DBusAddons" "KF5Declarative" "KF5DocTools" "KF5GlobalAccel" "KF5I18n" "KF5IdleTime" "KF5JsEmbed" "KF5KCMUtils" "KF5KDELibs4Support" "KF5NO_MODULE" "KF5NetworkManagerQt" "KF5NewStuff" "KF5NotifyConfig" "KF5Package" "KF5Plasma" "KF5PlasmaQuick" "KF5Prison" "KF5Runner" "KF5Screen" "KF5Solid" "KF5Su" "KF5SysGuard" "KF5TextEditor" "KF5TextWidgets" "KF5Wallet" "KF5Wayland" "KF5WebKit" "KF5XmlRpcClient" "KWinDBusInterface" "Phonon4Qt5" "Qalculate" "Qt5" "Qt5Concurrent" "Qt5DBus" "Qt5Network" "Qt5Qml" "Qt5Quick" "Qt5QuickWidgets" "Qt5Script" "Qt5Sql" "Qt5Test" "Qt5WebKitWidgets" "Qt5Widgets" "Qt5X11Extras" "Wayland" "WaylandScanner" "X11" "XCB" "ZLIB" "dbusmenu-qt5" "libgps" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [ "KF5SysGuard" ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  plasma-workspace-wallpapers = {
+    buildInputs = [ "ECM" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  polkit-kde-agent = {
+    buildInputs = [ "ECM" "KF5" "KF5Config" "KF5CoreAddons" "KF5Crash" "KF5DBusAddons" "KF5I18n" "KF5IconThemes" "KF5Notifications" "KF5WidgetsAddons" "KF5WindowSystem" "PolkitQt5-1" "Qt5" "Qt5Core" "Qt5DBus" "Qt5Widgets" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  powerdevil = {
+    buildInputs = [ "ECM" "KF5" "KF5Activities" "KF5Auth" "KF5Config" "KF5DBusAddons" "KF5GlobalAccel" "KF5I18n" "KF5IdleTime" "KF5KDELibs4Support" "KF5KIO" "KF5NotifyConfig" "KF5Screen" "KF5Solid" "LibKWorkspace" "Qt5" "Qt5DBus" "Qt5Widgets" "Qt5X11Extras" "UDev" "XCB" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  sddm-kcm = {
+    buildInputs = [ "ECM" "KF5" "KF5Auth" "KF5ConfigWidgets" "KF5CoreAddons" "KF5I18n" "KF5KIO" "KF5XmlGui" "Qt5" "Qt5Core" "Qt5Designer" "Qt5Gui" "Qt5Quick" "Qt5QuickWidgets" "Qt5Widgets" "Qt5X11Extras" "X11" "XCB" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  systemsettings = {
+    buildInputs = [ "ECM" "KF5" "KF5Config" "KF5DBusAddons" "KF5DocTools" "KF5I18n" "KF5IconThemes" "KF5ItemViews" "KF5KCMUtils" "KF5KHtml" "KF5KIO" "KF5Service" "KF5WindowSystem" "KF5XmlGui" "Qt5" "Qt5Widgets" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+  user-manager = {
+    buildInputs = [ "ECM" "KF5" "KF5I18n" "KF5KDELibs4Support" "PWQuality" "Qt5" "Qt5Core" "Qt5NO_MODULE" "Qt5Widgets" ];
+    nativeBuildInputs = [ "cmake" ];
+    propagatedBuildInputs = [  ];
+    propagatedNativeBuildInputs = [  ];
+    propagatedUserEnvPkgs = [  ];
+  };
+
+}
diff --git a/pkgs/desktops/plasma-5.3/dependencies.sh b/pkgs/desktops/plasma-5.3/dependencies.sh
new file mode 100755
index 000000000000..e614efc54759
--- /dev/null
+++ b/pkgs/desktops/plasma-5.3/dependencies.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# This script rebuilds dependencies.nix.
+# You must run manifest.sh first to download the packages.
+
+# Without arguments, this will use the version of autonix-deps-kf5 in nixpkgs.
+# If you are working on the packages, this is probably what you want.
+
+# You can also pass the path to a source tree where you have built
+# autonix-deps-kf5 yourself. If you are working on autonix-deps-kf5, this is
+# probably what you want.
+
+manifestXML=$(nix-build -E 'with (import ../../.. {}); autonix.writeManifestXML ./manifest.nix')
+
+autonixDepsKf5=""
+if [[ -z $1 ]]; then
+    autonixDepsKF5=$(nix-build ../../.. -A haskellngPackages.autonix-deps-kf5)/bin
+else
+    autonixDepsKF5="$1/dist/build/kf5-deps"
+fi
+
+exec ${autonixDepsKF5}/kf5-deps "${manifestXML}"
diff --git a/pkgs/desktops/plasma-5.3/kwin/kwin-import-plugin-follow-symlinks.patch b/pkgs/desktops/plasma-5.3/kwin/kwin-import-plugin-follow-symlinks.patch
new file mode 100644
index 000000000000..fd1f35d717e3
--- /dev/null
+++ b/pkgs/desktops/plasma-5.3/kwin/kwin-import-plugin-follow-symlinks.patch
@@ -0,0 +1,13 @@
+diff --git a/clients/aurorae/src/aurorae.cpp b/clients/aurorae/src/aurorae.cpp
+index 26b44a9..d14e226 100644
+--- a/clients/aurorae/src/aurorae.cpp
++++ b/clients/aurorae/src/aurorae.cpp
+@@ -73,7 +73,7 @@ void AuroraeFactory::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();
diff --git a/pkgs/desktops/plasma-5.3/kwin/libinput-0.8.patch b/pkgs/desktops/plasma-5.3/kwin/libinput-0.8.patch
new file mode 100644
index 000000000000..d0b9658b3bfc
--- /dev/null
+++ b/pkgs/desktops/plasma-5.3/kwin/libinput-0.8.patch
@@ -0,0 +1,25 @@
+commit a93a2ab1918630c6d571b5a24379c15a0458d1fa
+Author: Martin Gräßlin <mgraesslin@kde.org>
+Date:   Wed Jan 28 16:20:57 2015 +0100
+
+    Disable libinput integration if >= 0.8 is found
+    
+    libinput 0.8 is incompatible causing the build to fail. As we are in
+    dependency freeze the only option is to disable the build.
+    
+    BUG: 342893
+    FIXED-IN: 5.2.1
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 550ef57..8d9c593 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -145,7 +145,7 @@ set_package_properties(UDev PROPERTIES  URL "http://www.freedesktop.org/software
+                                         PURPOSE "Required for input handling on Wayland."
+                         )
+ set(HAVE_INPUT FALSE)
+-if (Libinput_FOUND AND UDEV_FOUND)
++if (Libinput_FOUND AND UDEV_FOUND AND Libinput_VERSION VERSION_LESS 0.8)
+     set(HAVE_INPUT TRUE)
+ endif()
+ 
diff --git a/pkgs/desktops/plasma-5.3/libkscreen/libkscreen-backend-path.patch b/pkgs/desktops/plasma-5.3/libkscreen/libkscreen-backend-path.patch
new file mode 100644
index 000000000000..d5797924d233
--- /dev/null
+++ b/pkgs/desktops/plasma-5.3/libkscreen/libkscreen-backend-path.patch
@@ -0,0 +1,130 @@
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 460022f..422a708 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -1,5 +1,7 @@
+ include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${QT_INCLUDES})
+ 
++configure_file(config-libkscreen.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-libkscreen.h)
++
+ set(libkscreen_SRCS
+     backendloader.cpp
+     config.cpp
+diff --git a/src/backendloader.cpp b/src/backendloader.cpp
+index b93e469..8aebc14 100644
+--- a/src/backendloader.cpp
++++ b/src/backendloader.cpp
+@@ -16,6 +16,7 @@
+  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA       *
+  *************************************************************************************/
+ 
++#include "config-libkscreen.h"
+ #include "backendloader.h"
+ #include "debug_p.h"
+ #include "backends/abstractbackend.h"
+@@ -40,55 +41,54 @@ bool BackendLoader::init()
+     const QString backend = qgetenv("KSCREEN_BACKEND").constData();
+     const QString backendFilter = QString::fromLatin1("KSC_%1*").arg(backend);
+ 
+-    const QStringList paths = QCoreApplication::libraryPaths();
+-    Q_FOREACH (const QString &path, paths) {
+-        const QDir dir(path + QDir::separator() + QLatin1String("/kf5/kscreen/"),
+-                       backendFilter,
+-                       QDir::SortFlags(QDir::QDir::NoSort),
+-                       QDir::NoDotAndDotDot | QDir::Files);
+-        const QFileInfoList finfos = dir.entryInfoList();
+-        Q_FOREACH (const QFileInfo &finfo, finfos) {
+-            // Skip "Fake" backend unless explicitly specified via KSCREEN_BACKEND
+-            if (backend.isEmpty() && finfo.fileName().contains(QLatin1String("KSC_Fake"))) {
+-                continue;
+-            }
++    QString path = QFile::decodeName(CMAKE_INSTALL_PREFIX "/" PLUGIN_INSTALL_DIR "/");
+ 
+-            // When on X11, skip the QScreen backend, instead use the XRandR backend,
+-            // if not specified in KSCREEN_BACKEND
+-            if (backend.isEmpty() &&
+-                    finfo.fileName().contains(QLatin1String("KSC_QScreen")) &&
+-                    QX11Info::isPlatformX11()) {
+-                continue;
+-            }
++    const QDir dir(path + QDir::separator() + QLatin1String("/kf5/kscreen/"),
++                   backendFilter,
++                   QDir::SortFlags(QDir::QDir::NoSort),
++                   QDir::NoDotAndDotDot | QDir::Files);
++    const QFileInfoList finfos = dir.entryInfoList();
++    Q_FOREACH (const QFileInfo &finfo, finfos) {
++        // Skip "Fake" backend unless explicitly specified via KSCREEN_BACKEND
++        if (backend.isEmpty() && finfo.fileName().contains(QLatin1String("KSC_Fake"))) {
++            continue;
++        }
+ 
+-            // When not on X11, skip the XRandR backend, and fall back to QSCreen
+-            // if not specified in KSCREEN_BACKEND
+-            if (backend.isEmpty() &&
+-                    finfo.fileName().contains(QLatin1String("KSC_XRandR")) &&
+-                    !QX11Info::isPlatformX11()) {
+-                continue;
+-            }
++        // When on X11, skip the QScreen backend, instead use the XRandR backend,
++        // if not specified in KSCREEN_BACKEND
++        if (backend.isEmpty() &&
++                finfo.fileName().contains(QLatin1String("KSC_QScreen")) &&
++                QX11Info::isPlatformX11()) {
++            continue;
++        }
++
++        // When not on X11, skip the XRandR backend, and fall back to QSCreen
++        // if not specified in KSCREEN_BACKEND
++        if (backend.isEmpty() &&
++                finfo.fileName().contains(QLatin1String("KSC_XRandR")) &&
++                !QX11Info::isPlatformX11()) {
++            continue;
++        }
+ 
+-            QPluginLoader loader(finfo.filePath());
+-            loader.load();
+-            QObject *instance = loader.instance();
+-            if (!instance) {
++        QPluginLoader loader(finfo.filePath());
++        loader.load();
++        QObject *instance = loader.instance();
++        if (!instance) {
++            loader.unload();
++            continue;
++        }
++
++        s_backend = qobject_cast< AbstractBackend* >(instance);
++        if (s_backend) {
++            if (!s_backend->isValid()) {
++                qCDebug(KSCREEN) << "Skipping" << s_backend->name() << "backend";
++                delete s_backend;
++                s_backend = 0;
+                 loader.unload();
+                 continue;
+             }
+-
+-            s_backend = qobject_cast< AbstractBackend* >(instance);
+-            if (s_backend) {
+-                if (!s_backend->isValid()) {
+-                    qCDebug(KSCREEN) << "Skipping" << s_backend->name() << "backend";
+-                    delete s_backend;
+-                    s_backend = 0;
+-                    loader.unload();
+-                    continue;
+-                }
+-                qCDebug(KSCREEN) << "Loading" << s_backend->name() << "backend";
+-                return true;
+-            }
++            qCDebug(KSCREEN) << "Loading" << s_backend->name() << "backend";
++            return true;
+         }
+     }
+ 
+diff --git a/src/config-libkscreen.h.cmake b/src/config-libkscreen.h.cmake
+new file mode 100644
+index 0000000..a99f3d1
+--- /dev/null
++++ b/src/config-libkscreen.h.cmake
+@@ -0,0 +1,2 @@
++#define CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
++#define PLUGIN_INSTALL_DIR "${PLUGIN_INSTALL_DIR}"
diff --git a/pkgs/desktops/plasma-5.3/manifest.nix b/pkgs/desktops/plasma-5.3/manifest.nix
new file mode 100644
index 000000000000..239d333b7da2
--- /dev/null
+++ b/pkgs/desktops/plasma-5.3/manifest.nix
@@ -0,0 +1,337 @@
+# This file is generated automatically. DO NOT EDIT!
+{ stdenv, fetchurl, mirror }:
+[
+  {
+    name = stdenv.lib.nameFromURL "kio-extras-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/5j458wgrnmcapib0iy67w20skbw630zv-kio-extras-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/kio-extras-5.2.95.tar.xz";
+      sha256 = "1mkncdz0gvd2jgmlpn45h11zwgh3czfd9zl9rdhp9knssf20hna4";
+      name = "kio-extras-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "kmenuedit-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/7112y2xbfmh0hlcg1s3whm57saibfzcf-kmenuedit-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/kmenuedit-5.2.95.tar.xz";
+      sha256 = "065gpjbbj4gpbvrm32lbdjknap4s4q2m539dkn82zp17v8drvqpw";
+      name = "kmenuedit-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "plasma-sdk-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/4hjlkvs8pwfzdzy17mrcr0zwq9jskpqp-plasma-sdk-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/plasma-sdk-5.2.95.tar.xz";
+      sha256 = "1yg1n7s0lkfjw4ayrgysqsgyll1xpf3z59a8c1vx1czr2if46hfb";
+      name = "plasma-sdk-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "sddm-kcm-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/lhlam20k8zhccqxx5a21c9x6gflx27x8-sddm-kcm-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/sddm-kcm-5.2.95.tar.xz";
+      sha256 = "1hw1b6gvdkfbsnwp32z1hwgpb9q11iancmmw7lx12bq0ichl297g";
+      name = "sddm-kcm-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "baloo-5.6.95.tar.xz" ".tar";
+    store = "/nix/store/1pig79610pk3fp964yj448729f6al15d-baloo-5.6.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/baloo-5.6.95.tar.xz";
+      sha256 = "17v30vlhyh4ax79yhqjvrq6g4zjnj0mayx7dlvjpmmwdnmgy6fxl";
+      name = "baloo-5.6.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "plasma-workspace-wallpapers-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/njcw3a7933qkq7rwfxd5fgzh8rbfmdcp-plasma-workspace-wallpapers-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/plasma-workspace-wallpapers-5.2.95.tar.xz";
+      sha256 = "12d9nxvs8d95qfv0lb4yf8w8x45kf441vwxch7p6j52vqb1v2p35";
+      name = "plasma-workspace-wallpapers-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "polkit-kde-agent-1-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/5bhbhnjfkml4ijpicyz5bc1h3m52708j-polkit-kde-agent-1-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/polkit-kde-agent-1-5.2.95.tar.xz";
+      sha256 = "1pr5na715hi6v3kfvbk66y91p425lwl05irym6y5cpqjsa57785d";
+      name = "polkit-kde-agent-1-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "libkscreen-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/m9vlln9609smnkpljkibd6y276zmbl00-libkscreen-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/libkscreen-5.2.95.tar.xz";
+      sha256 = "05g8nv5p1mq74gcwlfw65c5mal8wcdffv13gmhhb10yx6yzk7ygg";
+      name = "libkscreen-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "muon-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/3q7asdd3qs31vjkg7xs7pvpiwhd4kwsn-muon-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/muon-5.2.95.tar.xz";
+      sha256 = "06dsjsb721g5lal70b28rdc0av4cbrk5dslianmlhz7h0kzafs1g";
+      name = "muon-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "ksshaskpass-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/hpyk2ckwygc598swc0c6ncrj2y8r90cv-ksshaskpass-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/ksshaskpass-5.2.95.tar.xz";
+      sha256 = "08si6vj34zhgqsxnip8pb54bf1q4ycb5zdz4hzvf1wf51hp027gn";
+      name = "ksshaskpass-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "milou-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/wc0a3ifcp6q7vm36g1sbd4b2czjvcg96-milou-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/milou-5.2.95.tar.xz";
+      sha256 = "02s0iarwdavpg6qnrzq6b3yx6a5i2fwjb15b9gj7hzib9i17w0hv";
+      name = "milou-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "kde-gtk-config-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/1i0l6rv69nxrvczh83as7xvj2lklqhkd-kde-gtk-config-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/kde-gtk-config-5.2.95.tar.xz";
+      sha256 = "1hcrm6x46him9s19ffj6mp7qhllkl3x1k1q2c1b7cynf9y6l810w";
+      name = "kde-gtk-config-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "powerdevil-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/77avwmqzs7ghmafj33sbakxkl1v4b6y3-powerdevil-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/powerdevil-5.2.95.tar.xz";
+      sha256 = "15bml54l4daxd3shgf73s2y3qd05c0r9x8xib1axpmdjnl6501r8";
+      name = "powerdevil-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "ksysguard-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/9rn2l0n0p1r91nki26mxlc007h2zf60j-ksysguard-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/ksysguard-5.2.95.tar.xz";
+      sha256 = "0ddggn5vwdsylivcb5z91z446xiaqpm36cyakazri0ps9hddfi0n";
+      name = "ksysguard-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "kfilemetadata-5.6.95.tar.xz" ".tar";
+    store = "/nix/store/qg0wk3g6d2rrs7sz0vqy47ik2d23zipd-kfilemetadata-5.6.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/kfilemetadata-5.6.95.tar.xz";
+      sha256 = "1k3x0yj0clqcadkz50fqyx61s6kvqibks26nklj39rh1yy0d09yj";
+      name = "kfilemetadata-5.6.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "kwrited-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/90h7q76s7ij8w7sxjwb439kagrny2k3h-kwrited-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/kwrited-5.2.95.tar.xz";
+      sha256 = "1ria0h7s7iqjnvrz7dfcfrd4lv7rb82csz4vklxd0s5bzqj92kv3";
+      name = "kwrited-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "kdeplasma-addons-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/hdjfwdx493wnqr8afn10hnbxrpkl8drr-kdeplasma-addons-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/kdeplasma-addons-5.2.95.tar.xz";
+      sha256 = "0jcqilb4apxzp9ajfvy4rn1wplabbwhbkra4mn0c1f1qgy5jxzmy";
+      name = "kdeplasma-addons-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "khotkeys-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/aq9vv31hqsvnkg5qj86mwaw75izh7f9g-khotkeys-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/khotkeys-5.2.95.tar.xz";
+      sha256 = "1ap8y1sa9qqbb1lc42k8m4ir9bmlghj936qrhsa6nni9ncgn7v58";
+      name = "khotkeys-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "user-manager-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/xskwg62jba6ryx6d9cf7fc4hhngn6m72-user-manager-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/user-manager-5.2.95.tar.xz";
+      sha256 = "02s8ral3brpc1sn9xnmrfyw3bcn0rdaacz8p91qahz0kjf142yvn";
+      name = "user-manager-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "bluez-qt-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/fa4c2x5l6wr586yzzmh3h90g26yas3m0-bluez-qt-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/bluez-qt-5.2.95.tar.xz";
+      sha256 = "07bc8f06yd9zciydag4hj894c38pv4zhcrlmfgp4lidnnk9lsxab";
+      name = "bluez-qt-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "kdecoration-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/ksqsjrr3fdfamjq50r5jy1i5p14ikn29-kdecoration-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/kdecoration-5.2.95.tar.xz";
+      sha256 = "08yzrqbwrpxc0armigpv7wrwp7bz3wgccwzi4py6lywv8wsrrmq7";
+      name = "kdecoration-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "oxygen-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/hpn2p07q203zfqrx7qyg04rxawd6yrrs-oxygen-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/oxygen-5.2.95.tar.xz";
+      sha256 = "14bklqcwdyjjlhy99a9jfrs52qznydvi3ybkxgrxas7g0xy1rsrw";
+      name = "oxygen-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "systemsettings-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/bh2s68dmixjk8422ha4m69czz9704rni-systemsettings-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/systemsettings-5.2.95.tar.xz";
+      sha256 = "1zl027qlg15myiad1953b9y5110fsw2xs5sv4l29ri3f27v5rhps";
+      name = "systemsettings-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "kde-cli-tools-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/m690wwl3whdpxhqq4g81kwy4i5wzcldk-kde-cli-tools-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/kde-cli-tools-5.2.95.tar.xz";
+      sha256 = "052az8w1iaaiv14kjrsjndgsxbrj3167z0zcpsj78bgw61apawkd";
+      name = "kde-cli-tools-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "plasma-desktop-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/bj2dmd96l9bgdi1xxqqaz8c558yxjscz-plasma-desktop-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/plasma-desktop-5.2.95.tar.xz";
+      sha256 = "1zyzqhmmy5sf8xxnknv5z36fzn0497girqvkx58kvb9zdwq4d1bl";
+      name = "plasma-desktop-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "plasma-mediacenter-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/ypk31w9vglrqpif9r8v6hlq6ia77ywpj-plasma-mediacenter-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/plasma-mediacenter-5.2.95.tar.xz";
+      sha256 = "1n0yqkxvlic8b75gb233inig383skzcfz751ylh86ppsfqjaf5jn";
+      name = "plasma-mediacenter-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "plasma-nm-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/pa12m99mmwxif2br46qghx7ypvwaxqs1-plasma-nm-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/plasma-nm-5.2.95.tar.xz";
+      sha256 = "0p6syjavn7w8vhpx0hvxis99qqcwmh4cng0svfqmxqpmwb9iwfca";
+      name = "plasma-nm-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "oxygen-fonts-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/dcxsc6givwv0jmjaan0xx69ldz2w1sz5-oxygen-fonts-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/oxygen-fonts-5.2.95.tar.xz";
+      sha256 = "04yv8msnfxaph7dlvx618xlvfh8r9qgw004ixs7k5ckw6w16xz3s";
+      name = "oxygen-fonts-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "kinfocenter-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/6nrza8pv196d8zlljbi3p8hy5mxn83fm-kinfocenter-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/kinfocenter-5.2.95.tar.xz";
+      sha256 = "0h99pnsh0zsp3xhr3chda9km9n91raf8sxrycsrhjsg4vjah2lav";
+      name = "kinfocenter-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "kwin-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/imir1ak0asfxs3kg48kzj3jafpjinxlp-kwin-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/kwin-5.2.95.tar.xz";
+      sha256 = "0pircn5h061zjw50gm6bx1kr7z3hrk81rvp328yp7gfqanwxzbr2";
+      name = "kwin-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "bluedevil-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/60vbb1qwya5k3r0zyx0x7bsvc0c800k4-bluedevil-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/bluedevil-5.2.95.tar.xz";
+      sha256 = "1qappzwqdl83mvhj5d643pjfr8l39zdqpfnk4bb56b62hxfmmp3z";
+      name = "bluedevil-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "plasma-workspace-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/4jdgvnr5mmdnhpvg0v9rri29vrc03pry-plasma-workspace-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/plasma-workspace-5.2.95.tar.xz";
+      sha256 = "1q1y03brfhc7qgzpa9vai6891pd6hnfj0p0x5shn4irkh5lh5yrg";
+      name = "plasma-workspace-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "kscreen-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/wxvnimhl5j9ak9gmc1s1di7mprcyzh35-kscreen-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/kscreen-5.2.95.tar.xz";
+      sha256 = "1k76rixy2s4wiyl4rg05hxblq79j5flb1safdr78872jp9b772bg";
+      name = "kscreen-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "khelpcenter-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/v7pjw4wnvx7gffdsqp4fbdhxk3anf8na-khelpcenter-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/khelpcenter-5.2.95.tar.xz";
+      sha256 = "1xm6220bs4iq55ia6yfyl6jawwivjy9y4pcqyl1m34lsjrnbvywc";
+      name = "khelpcenter-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "kwayland-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/llgf9py7y03gg2grcwjkyicp306vd3qz-kwayland-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/kwayland-5.2.95.tar.xz";
+      sha256 = "1019m668p1ngfx8vv0wg41yhz7dprwy1125a8rdzqgpkspfj63h4";
+      name = "kwayland-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "libksysguard-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/bpdp5g0znahl58j75b511ywa5042pya2-libksysguard-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/libksysguard-5.2.95.tar.xz";
+      sha256 = "1cszlh2w8fkb66fpjq0ni7d2hd1yjc9z46hh39fdih3pfwwb4hhx";
+      name = "libksysguard-5.2.95.tar.xz";
+    };
+  }
+  {
+    name = stdenv.lib.nameFromURL "breeze-5.2.95.tar.xz" ".tar";
+    store = "/nix/store/jvf0gxiq28sdkk0nvhn71n2hmwhxavwb-breeze-5.2.95.tar.xz";
+    src = fetchurl {
+      url = "${mirror}/kde/unstable/plasma/5.2.95/breeze-5.2.95.tar.xz";
+      sha256 = "16a0qsi1z5sk7s8jmvc808bk29mxkl2f5qvls8j8pcpb9mp8czr3";
+      name = "breeze-5.2.95.tar.xz";
+    };
+  }
+]
diff --git a/pkgs/desktops/plasma-5.3/manifest.sh b/pkgs/desktops/plasma-5.3/manifest.sh
new file mode 100755
index 000000000000..f253ea27c0bf
--- /dev/null
+++ b/pkgs/desktops/plasma-5.3/manifest.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+KDE_MIRROR="${KDE_MIRROR:-http://download.kde.org}"
+
+# The extra slash at the end of the URL is necessary to stop wget
+# from recursing over the whole server! (No, it's not a bug.)
+$(nix-build ../../.. -A autonix.manifest) \
+    "${KDE_MIRROR}/unstable/plasma/5.2.95/" \
+    -A '*.tar.xz'
diff --git a/pkgs/desktops/plasma-5.3/plasma-desktop/plasma-desktop-hwclock.patch b/pkgs/desktops/plasma-5.3/plasma-desktop/plasma-desktop-hwclock.patch
new file mode 100644
index 000000000000..53bd43d38e2c
--- /dev/null
+++ b/pkgs/desktops/plasma-5.3/plasma-desktop/plasma-desktop-hwclock.patch
@@ -0,0 +1,24 @@
+diff --git a/kcms/dateandtime/helper.cpp b/kcms/dateandtime/helper.cpp
+index cec5ab8..fc4a6b9 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 = QLatin1String("/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("hwclock", exePath);
++    QString hwclock = "@hwclock@";
+     if (!hwclock.isEmpty()) {
+         KProcess::execute(hwclock, QStringList() << "--systohc");
+     }
diff --git a/pkgs/desktops/plasma-5.3/plasma-desktop/plasma-desktop-zoneinfo.patch b/pkgs/desktops/plasma-5.3/plasma-desktop/plasma-desktop-zoneinfo.patch
new file mode 100644
index 000000000000..e924207054d1
--- /dev/null
+++ b/pkgs/desktops/plasma-5.3/plasma-desktop/plasma-desktop-zoneinfo.patch
@@ -0,0 +1,18 @@
+diff --git a/kcms/dateandtime/helper.cpp b/kcms/dateandtime/helper.cpp
+index fc4a6b9..7b64d05 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;
++    // NixOS-specific path
++    QString tz = "/etc/zoneinfo/" + selectedzone;
++    if (!QFile::exists(tz)) {
++      // Standard Linux path
++      tz = "/usr/share/zoneinfo/" + selectedzone;
++    }
+ 
+     if (QFile::exists(tz)) { // make sure the new TZ really exists
+         QFile::remove("/etc/localtime");
diff --git a/pkgs/desktops/plasma-5.3/renames.nix b/pkgs/desktops/plasma-5.3/renames.nix
new file mode 100644
index 000000000000..e099edd8d83a
--- /dev/null
+++ b/pkgs/desktops/plasma-5.3/renames.nix
@@ -0,0 +1,23 @@
+# DO NOT EDIT! This file is generated automatically.
+{ }:
+{
+"Backend" = "powerdevil";
+"CTest" = "kdeplasma-addons";
+"ECM" = "extra-cmake-modules";
+"KDecoration2" = "kdecoration";
+"KF5ActivitiesExperimentalStats" = "plasma-desktop";
+"KF5Baloo" = "baloo";
+"KF5BluezQt" = "bluez-qt";
+"KF5FileMetaData" = "kfilemetadata";
+"KF5Screen" = "libkscreen";
+"KF5SysGuard" = "libksysguard";
+"KF5Wayland" = "kwayland";
+"KHotKeysDBusInterface" = "khotkeys";
+"KRunnerAppDBusInterface" = "plasma-workspace";
+"KSMServerDBusInterface" = "plasma-workspace";
+"KWinDBusInterface" = "kwin";
+"LibKWorkspace" = "plasma-workspace";
+"LibTaskManager" = "plasma-workspace";
+"OxygenFont" = "oxygen-fonts";
+"ScreenSaverDBusInterface" = "plasma-workspace";
+}
diff --git a/pkgs/desktops/plasma-5.3/setup-hook.sh b/pkgs/desktops/plasma-5.3/setup-hook.sh
new file mode 100644
index 000000000000..a8d9b7e0e36f
--- /dev/null
+++ b/pkgs/desktops/plasma-5.3/setup-hook.sh
@@ -0,0 +1 @@
+addToSearchPath XDG_DATA_DIRS @out@/share
diff --git a/pkgs/desktops/plasma-5.3/startkde/default.nix b/pkgs/desktops/plasma-5.3/startkde/default.nix
new file mode 100644
index 000000000000..624c5d239d5d
--- /dev/null
+++ b/pkgs/desktops/plasma-5.3/startkde/default.nix
@@ -0,0 +1,34 @@
+# We provide our own version of the startkde script in its entirety, rather than
+# patching the version provided by kde-workspace, because it requires such
+# extensive patching.
+
+{ stdenv, bash, dbus, gnused, gnugrep, kconfig, kinit, kservice, plasma-desktop
+, plasma-workspace, qt5, socat, xorg }:
+
+let startkde = ./startkde.in; in
+
+stdenv.mkDerivation {
+  name = "startkde-0.1";
+  phases = "installPhase";
+
+  inherit bash gnused gnugrep kconfig kinit kservice socat;
+  inherit (xorg) mkfontdir xmessage xprop xrdb xset xsetroot;
+  qt5tools = qt5.tools;
+  dbus_tools = dbus.tools;
+  plasmaWorkspace = plasma-workspace;
+  plasmaDesktop = plasma-desktop;
+  startupconfigkeys = ./startupconfigkeys;
+  kdeglobals = ./kdeglobals;
+
+  installPhase = ''
+    mkdir -p $out/bin
+    substituteAll ${startkde} $out/bin/startkde
+    chmod +x $out/bin/startkde
+  '';
+
+  meta = {
+    description = "Custom startkde script for Nixpkgs";
+    maintainers = with stdenv.lib.maintainers; [ ttuegel ];
+    license = with stdenv.lib.licenses; [ gpl2Plus ];
+  };
+}
diff --git a/pkgs/desktops/plasma-5.3/startkde/kdeglobals b/pkgs/desktops/plasma-5.3/startkde/kdeglobals
new file mode 100644
index 000000000000..bfa610712ede
--- /dev/null
+++ b/pkgs/desktops/plasma-5.3/startkde/kdeglobals
@@ -0,0 +1,11 @@
+[General]
+XftAntialias=true
+XftHintStyle=hintmedium
+XftSubPixel=none
+desktopFont=Oxygen-Sans,10,-1,5,50,0,0,0,0,0
+fixed=Oxygen Mono,9,-1,5,50,0,0,0,0,0
+font=Oxygen-Sans,10,-1,5,50,0,0,0,0,0
+menuFont=Oxygen-Sans,10,-1,5,50,0,0,0,0,0
+smallestReadableFont=Oxygen-Sans,8,-1,5,50,0,0,0,0,0
+taskbarFont=Oxygen-Sans,10,-1,5,50,0,0,0,0,0
+toolBarFont=Oxygen-Sans,9,-1,5,50,0,0,0,0,0
\ No newline at end of file
diff --git a/pkgs/desktops/plasma-5.3/startkde/startkde.in b/pkgs/desktops/plasma-5.3/startkde/startkde.in
new file mode 100644
index 000000000000..0825a0733f43
--- /dev/null
+++ b/pkgs/desktops/plasma-5.3/startkde/startkde.in
@@ -0,0 +1,374 @@
+#!@bash@/bin/bash -x
+#
+#  NIXOS KDE STARTUP SCRIPT
+#
+
+# 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
+    @gnused@/bin/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
+    export KWIN_COMPOSE KDE_FAILSAFE
+fi
+
+# When the X server dies we get a HUP signal from xinit. We must ignore it
+# because we still need to do some cleanup.
+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
+
+# Check if a KDE session already is running and whether it's possible to connect to X
+@plasmaWorkspace@/bin/kcheckrunning
+kcheckrunning_result=$?
+if test $kcheckrunning_result -eq 0 ; then
+  @xmessage@/bin/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
+fi
+
+# Boot sequence:
+#
+# kdeinit is used to fork off processes which improves memory usage
+# and startup time.
+#
+# * kdeinit starts klauncher first.
+# * Then kded is started. kded is responsible for keeping the sycoca
+#   database up to date. When an up to date database is present it goes
+#   into the background and the startup continues.
+# * Then kdeinit starts kcminit. kcminit performs initialisation of
+#   certain devices according to the user's settings
+#
+# * 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
+configDir=$(@qt5tools@/bin/qtpaths --writable-path GenericConfigLocation)
+mkdir -p "$configDir"
+
+# This is basically setting defaults so we can use them with kstartupconfig5
+cat @startupconfigkeys@ >$configDir/startupconfigkeys
+
+# preload the user's locale on first start
+plasmalocalerc=$configDir/plasma-localerc
+test -f $plasmalocalerc || {
+cat >$plasmalocalerc <<EOF
+[Formats]
+LANG=$LANG
+EOF
+}
+
+# export LC_* variables set by kcmshell5 formats into environment
+# so it can be picked up by QLocale and friends.
+exportformatssettings=$configDir/plasma-locale-settings.sh
+[ -f $exportformatssettings ] && . $exportformatssettings
+
+# Write a default kdeglobals file to set up the font
+kdeglobalsfile=$configDir/kdeglobals
+[ -f $kdeglobalsfile ] || cat @kdeglobals@ >$kdeglobalsfile
+
+@plasmaWorkspace@/bin/kstartupconfig5
+returncode=$?
+if test $returncode -ne 0; then
+    @xmessage@/bin/xmessage -geometry 500x100 "kstartupconfig5 exited with $returncode"
+    exit 1
+fi
+[ -r $configDir/startupconfig ] && . $configDir/startupconfig
+
+XCURSOR_PATH=~/.icons:$(echo "$XDG_DATA_DIRS" | tr ":" "\n" | @gnused@/bin/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
+
+    @plasmaDesktop@/bin/kapplymousetheme "$kcminputrc_mouse_cursortheme" "$kcminputrc_mouse_cursorsize"
+    if test $? -eq 10; then
+        XCURSOR_THEME=default
+        export XCURSOR_THEME
+    elif test -n "$kcminputrc_mouse_cursortheme"; then
+        XCURSOR_THEME="$kcminputrc_mouse_cursortheme"
+        export XCURSOR_THEME
+    fi
+    if test -n "$kcminputrc_mouse_cursorsize"; then
+        XCURSOR_SIZE="$kcminputrc_mouse_cursorsize"
+        export XCURSOR_SIZE
+    fi
+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@/bin/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_tools@/bin/dbus-launch --sh-syntax --exit-with-session`
+fi
+if @qt5tools@/bin/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@/bin/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=`@plasmaWorkspace@/bin/ksplashqml "${ksplashrc_ksplash_theme}" --pid`
+      ;;
+    None)
+      ;;
+    *)
+      ;;
+  esac
+fi
+
+# Source scripts found in <config locations>/plasma-workspace/env/*.sh
+# (where <config locations> correspond to the system and user's configuration
+# directories, as identified by Qt's qtpaths,  e.g.  $HOME/.config
+# and /etc/xdg/ on Linux)
+#
+# This is where you can define environment variables that will be available to
+# all KDE programs, so this is where you can run agents using e.g. eval `ssh-agent`
+# or eval `gpg-agent --daemon`.
+# Note: if you do that, you should also put "ssh-agent -k" as a shutdown script
+#
+# (see end of this file).
+# For anything else (that doesn't set env vars, or that needs a window manager),
+# better use the Autostart folder.
+
+scriptpath=$(@qt5tools@/bin/qtpaths --paths GenericConfigLocation | tr ':' '\n' | @gnused@/bin/sed 's,$,/plasma-workspace,g')
+
+# Add /env/ to the directory to locate the scripts to be sourced
+for prefix in `echo $scriptpath`; do
+  for file in "$prefix"/env/*.sh; do
+    test -r "$file" && . "$file"
+  done
+done
+
+# Set the path for Qt plugins provided by KDE
+QT_PLUGIN_PATH=${QT_PLUGIN_PATH+$QT_PLUGIN_PATH:}`@qt5tools@/bin/qtpaths --plugin-dir`
+# TODO: Do we really need this?
+QT_PLUGIN_PATH=$QT_PLUGIN_PATH:$kdehome/lib/kde5/plugins/
+export QT_PLUGIN_PATH
+
+# Activate the kde font directories.
+#
+# There are 4 directories that may be used for supplying fonts for KDE.
+#
+# There are two system directories. These belong to the administrator.
+# There are two user directories, where the user may add her own fonts.
+#
+# The 'override' versions are for fonts that should come first in the list,
+# i.e. if you have a font in your 'override' directory, it will be used in
+# preference to any other.
+#
+# The preference order looks like this:
+# user override, system override, X, user, system
+#
+# Where X is the original font database that was set up before this script
+# runs.
+
+usr_odir=$HOME/.fonts/kde-override
+usr_fdir=$HOME/.fonts
+
+if test -n "$KDEDIRS"; then
+  kdedirs_first=`echo "$KDEDIRS" | @gnused@/bin/sed -e 's/:.*//'`
+  sys_odir=$kdedirs_first/share/fonts/override
+  sys_fdir=$kdedirs_first/share/fonts
+else
+  sys_odir=$KDEDIR/share/fonts/override
+  sys_fdir=$KDEDIR/share/fonts
+fi
+
+# We run mkfontdir on the user's font dirs (if we have permission) to pick
+# up any new fonts they may have installed. If mkfontdir fails, we still
+# 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@/bin/xset +fp "$sys_odir"
+test -d "$usr_odir" && ( @mkfontdir@/bin/mkfontdir "$usr_odir" ; @xset@/bin/xset +fp "$usr_odir" )
+test -d "$usr_fdir" && ( @mkfontdir@/bin/mkfontdir "$usr_fdir" ; @xset@/bin/xset fp+ "$usr_fdir" )
+test -d "$sys_fdir" && @xset@/bin/xset fp+ "$sys_fdir"
+
+# Ask X11 to rebuild its font list.
+@xset@/bin/xset fp rehash
+
+# Get Ghostscript to look into user's KDE fonts dir for additional Fontmap
+if test -n "$GS_LIB" ; then
+    GS_LIB=$usr_fdir:$GS_LIB
+    export GS_LIB
+else
+    GS_LIB=$usr_fdir
+    export GS_LIB
+fi
+
+echo 'startkde: Starting up...'  1>&2
+
+
+# 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
+# directly from the KDE session but e.g. using "ssh -X", kdesu. $KDE_FULL_SESSION
+# however guarantees that the application is launched in the same environment
+# like the KDE session and that e.g. KDE utilities/libraries are available.
+# KDE_FULL_SESSION property is also only available since KDE 3.5.5.
+# The matching tests are:
+#   For $KDE_FULL_SESSION:
+#     if test -n "$KDE_FULL_SESSION"; then ... whatever
+#   For KDE_FULL_SESSION property:
+#     xprop -root | grep "^KDE_FULL_SESSION" >/dev/null 2>/dev/null
+#     if test $? -eq 0; then ... whatever
+#
+# Additionally there is (since KDE 3.5.7) $KDE_SESSION_UID with the uid
+# of the user running the KDE session. It should be rarely needed (e.g.
+# after sudo to prevent desktop-wide functionality in the new user's kded).
+#
+# Since KDE4 there is also KDE_SESSION_VERSION, containing the major version number.
+# Note that this didn't exist in KDE3, which can be detected by its absense and
+# the presence of KDE_FULL_SESSION.
+#
+KDE_FULL_SESSION=true
+export KDE_FULL_SESSION
+@xprop@/bin/xprop -root -f KDE_FULL_SESSION 8t -set KDE_FULL_SESSION true
+
+KDE_SESSION_VERSION=5
+export KDE_SESSION_VERSION
+@xprop@/bin/xprop -root -f KDE_SESSION_VERSION 32c -set KDE_SESSION_VERSION 5
+
+KDE_SESSION_UID=`id -ru`
+export KDE_SESSION_UID
+
+XDG_CURRENT_DESKTOP=KDE
+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@/bin/socat STDIN UNIX-CONNECT:$PAM_KWALLET_LOGIN
+fi
+
+# At this point all environment variables are set, let's send it to the DBus
+# session server to update the activation environment
+@plasmaWorkspace@/lib/libexec/ksyncdbusenv
+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@/bin/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 @kinit@/lib/libexec/kf5/start_kdeinit_wrapper --kded +kcminit_startup
+if test $? -ne 0; then
+  # Startup error
+  echo 'startkde: Could not start kdeinit5.'  1>&2
+  test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null
+  @xmessage@/bin/xmessage -geometry 500x100 "Could not start kdeinit5."
+  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!
+@kservice@/bin/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
+# window manager instead of kwin.
+# if KDEWM is not set, ksmserver will ensure kwin is started.
+# kwrapper5 is used to reduce startup time and memory usage
+# kwrapper5 does not return useful error codes such as the exit code of ksmserver.
+# We only check for 255 which means that the ksmserver process could not be
+# started, any problems thereafter, e.g. ksmserver failing to initialize,
+# will remain undetected.
+test -n "$KDEWM" && KDEWM="--windowmanager $KDEWM"
+# If the session should be locked from the start (locked autologin),
+# lock now and do the rest of the KDE startup underneath the locker.
+KSMSERVEROPTIONS=""
+test -n "$dl" && KSMSERVEROPTIONS=" --lockscreen"
+@kinit@/bin/kwrapper5 @plasmaWorkspace@/bin/ksmserver $KDEWM $KSMSERVEROPTIONS
+if test $? -eq 255; then
+  # Startup error
+  echo 'startkde: Could not start ksmserver.'  1>&2
+  test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null
+  @xmessage@/bin/xmessage -geometry 500x100 "Could not start ksmserver."
+fi
+
+wait_drkonqi=`@kconfig@/bin/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=`@kconfig@/bin/kreadconfig5 --file startkderc --group WaitForDrKonqi --key Timeout --default 900`
+    wait_drkonqi_counter=0
+    while @qt5tools@/bin/qdbus | @gnugrep@/bin/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
+            @qt5tools@/bin/qdbus | @gnugrep@/bin/grep 'org.kde.drkonqi-' | while read address ; do
+                @qt5tools@/bin/qdbus "$address" "/MainApplication" "quit"
+            done
+            break
+        fi
+    done
+fi
+
+echo 'startkde: Shutting down...'  1>&2
+# just in case
+test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null
+
+# Clean up
+@kinit@/bin/kdeinit5_shutdown
+
+echo 'startkde: Running shutdown scripts...'  1>&2
+
+# Run scripts found in <config locations>/plasma-workspace/shutdown
+for prefix in `echo "$scriptpath"`; do
+  for file in `ls "$prefix"/shutdown 2> /dev/null | @gnugrep@/bin/egrep -v '(~|\.bak)$'`; do
+    test -x "$prefix$file" && "$prefix$file"
+  done
+done
+
+unset KDE_FULL_SESSION
+@xprop@/bin/xprop -root -remove KDE_FULL_SESSION
+unset KDE_SESSION_VERSION
+@xprop@/bin/xprop -root -remove KDE_SESSION_VERSION
+unset KDE_SESSION_UID
+
+echo 'startkde: Done.'  1>&2
diff --git a/pkgs/desktops/plasma-5.3/startkde/startupconfigkeys b/pkgs/desktops/plasma-5.3/startkde/startupconfigkeys
new file mode 100644
index 000000000000..0fc92cff8a53
--- /dev/null
+++ b/pkgs/desktops/plasma-5.3/startkde/startupconfigkeys
@@ -0,0 +1,5 @@
+kcminputrc Mouse cursorTheme 'breeze_cursors'
+kcminputrc Mouse cursorSize ''
+ksplashrc KSplash Theme Breeze
+ksplashrc KSplash Engine KSplashQML
+kcmfonts General forceFontDPI 0