Change:
On NixOS 17.03, the in the system configuration with Plasma 5 enabled, has and in its runtime closure, which causes unnecessary bloat. This is because has: then causes the directories of and to be to the wrapper script. (Automatically adding everything with a directory to the wrapper seems pretty drastic BTW.) System: NixOS Nix version: 1.12pre5073_1cf4801
KDE upstream is slightly careless about implicit runtime dependencies. I spent hours trying to figure out which runtime dependencies needed to be in . By the way, you have to guess at this because SDDM doesn't log error messages. Could we drop ? Probably. Can I answer that question for any of the other dependencies? Not a chance. So I nuked it from orbit. Guessing the correct setting would be a good project for a first-time contributor with a lot of free time. At the moment, I'm trying to get rid of entirely. This problem may go away as a happy accident, but that won't help this release. I'm open to other suggestions.

Discussion:
"See the 16.09 release notes for more information.") (mkRemovedOptionModule [ "services" "phpfpm" "phpIni" ] "") (mkRemovedOptionModule [ "services" "dovecot2" "package" ] "") <ins> (mkRemovedOptionModule [ "services" "xserver" "displayManager" "sddm" "themes" ] "Set the option `services.xserver.displayManager.sddm.package' instead.") </ins> ]; }

services.xserver.displayManager.sddm = { theme = "breeze"; <del> themes = [ pkgs.extra-cmake-modules # for the setup-hook plasma5.plasma-workspace pkgs.breeze-icons ]; </del> <ins> package = pkgs.sddmPlasma5; </ins> }; security.pam.services.kde = { allowNullPassword = true; };

cfg = dmcfg.sddm; xEnv = config.systemd.services."display-manager".environment; <del> sddm = pkgs.sddm.override { inherit (cfg) themes; }; </del> <ins> sddm = cfg.package; </ins> xserverWrapper = pkgs.writeScript "xserver-wrapper" '' #!/bin/sh

''; }; <del> themes = mkOption { type = types.listOf types.package; default = []; </del> <ins> package = mkOption { type = types.package; default = pkgs.sddm; </ins> description = '' <del> Extra packages providing themes. </del> <ins> The SDDM package to install. The default package can be overridden to provide extra themes. </ins> ''; };

<del> { stdenv, makeQtWrapper, fetchFromGitHub, fetchpatch </del> <ins> { stdenv, lib, makeQtWrapper, fetchFromGitHub, fetchpatch </ins> , cmake, extra-cmake-modules, pkgconfig, libxcb, libpthreadstubs, lndir , libXdmcp, libXau, qtbase, qtdeclarative, qttools, pam, systemd , themes

nativeBuildInputs = [ cmake extra-cmake-modules pkgconfig qttools ]; buildInputs = [ <del> libxcb libpthreadstubs libXdmcp libXau qtbase pam systemd </del> <ins> libxcb libpthreadstubs libXdmcp libXau pam systemd qtbase qtdeclarative </ins> ]; <del> propagatedBuildInputs = [ qtdeclarative ]; </del> <ins> propagatedUserEnvPkgs = builtins.map lib.getBin [ qtbase qtdeclarative ]; </ins> cmakeFlags = [ "-DCONFIG_FILE=/etc/sddm.conf"

installPhase = '' runHook preInstall <ins> propagated= for i in $unwrapped $themes; do findInputs $i propagated propagated-user-env-packages if [ -z "$crossConfig" ]; then findInputs $i propagated propagated-native-build-inputs else findInputs $i propagated propagated-build-inputs fi done for pkg in $propagated; do addToSearchPath RUNTIME_XDG_DATA_DIRS "$pkg/share" addToSearchPath RUNTIME_XDG_CONFIG_DIRS "$pkg/etc/xdg" done </ins> makeQtWrapper "$unwrapped/bin/sddm" "$out/bin/sddm" mkdir -p "$out/share/sddm"

nativeBuildInputs = [ extra-cmake-modules kdoctools ]; buildInputs = [ <ins> isocodes libdbusmenu libSM libXcursor pam wayland ]; propagatedBuildInputs = [ </ins> baloo kactivities kcmutils kconfig kcrash kdbusaddons kdeclarative kdelibs4support kdesu kglobalaccel kidletime kjsembed knewstuff knotifyconfig kpackage krunner ktexteditor ktextwidgets kwallet kwayland kwin kxmlrpcclient libkscreen libksysguard networkmanager-qt phonon <del> plasma-framework qtgraphicaleffects qtquickcontrols qtquickcontrols2 qtscript qtx11extras solid isocodes libdbusmenu libSM libXcursor pam wayland </del> <ins> plasma-framework solid qtgraphicaleffects qtquickcontrols qtquickcontrols2 qtscript qtx11extras </ins> ]; patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);

export QT_PLUGIN_PATH="$QT_PLUGIN_PATH${QT_PLUGIN_PATH:+:}${!outputLib}/lib/qt5/plugins" export QML_IMPORT_PATH="$QML_IMPORT_PATH${QML_IMPORT_PATH:+:}${!outputLib}/lib/qt5/imports" export QML2_IMPORT_PATH="$QML2_IMPORT_PATH${QML2_IMPORT_PATH:+:}${!outputLib}/lib/qt5/qml" <del> export RUNTIME_XDG_DATA_DIRS="$XDG_DATA_DIRS${XDG_DATA_DIRS:+:}${!outputBin}/share" export RUNTIME_XDG_CONFIG_DIRS="$XDG_CONFIG_DIRS${XDG_CONFIG_DIRS:+:}${!outputBin}/etc/xdg" </del> <ins> export RUNTIME_XDG_DATA_DIRS="$RUNTIME_XDG_DATA_DIRS${RUNTIME_XDG_DATA_DIRS:+:}${!outputBin}/share" export RUNTIME_XDG_CONFIG_DIRS="$RUNTIME_XDG_CONFIG_DIRS${RUNTIME_XDG_CONFIG_DIRS:+:}${!outputBin}/etc/xdg" </ins> } prePhases+=(_makeQtWrapperSetup)

themes = [];  # extra themes, etc. }; <ins> sddmPlasma5 = sddm.override { themes = [ plasma5.plasma-workspace pkgs.breeze-icons ]; }; </ins> skrooge = libsForQt5.callPackage ../applications/office/skrooge {}; slim = callPackage ../applications/display-managers/slim {