summary refs log tree commit diff
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@secure.mailbox.org>2017-03-22 07:50:06 -0500
committerGitHub <noreply@github.com>2017-03-22 07:50:06 -0500
commitacd9c5ace32608e3fcd836410f5b4fe6e3856c08 (patch)
tree3a9c8bd108f2b2f831e371258e2846dc3e52c2a2
parentd2cd304ad74f9d804f0a23e51a38510fbd6648f4 (diff)
parent403b87f0d58f3dd17b5bcf4f378bb4894b50d987 (diff)
downloadnixpkgs-acd9c5ace32608e3fcd836410f5b4fe6e3856c08.tar
nixpkgs-acd9c5ace32608e3fcd836410f5b4fe6e3856c08.tar.gz
nixpkgs-acd9c5ace32608e3fcd836410f5b4fe6e3856c08.tar.bz2
nixpkgs-acd9c5ace32608e3fcd836410f5b4fe6e3856c08.tar.lz
nixpkgs-acd9c5ace32608e3fcd836410f5b4fe6e3856c08.tar.xz
nixpkgs-acd9c5ace32608e3fcd836410f5b4fe6e3856c08.tar.zst
nixpkgs-acd9c5ace32608e3fcd836410f5b4fe6e3856c08.zip
Merge pull request #24205 from ttuegel/sddm-closure-size
SDDM closure size
-rw-r--r--nixos/modules/rename.nix2
-rw-r--r--nixos/modules/services/x11/desktop-managers/plasma5.nix6
-rw-r--r--nixos/modules/services/x11/display-managers/sddm.nix11
-rw-r--r--pkgs/applications/display-managers/sddm/default.nix24
-rw-r--r--pkgs/desktops/plasma-5/plasma-workspace/default.nix7
-rw-r--r--pkgs/development/libraries/qt-5/make-qt-wrapper-darwin.sh4
-rw-r--r--pkgs/development/libraries/qt-5/make-qt-wrapper.sh4
-rw-r--r--pkgs/top-level/all-packages.nix7
8 files changed, 46 insertions, 19 deletions
diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix
index 7b75ca85219..d9d399e3481 100644
--- a/nixos/modules/rename.nix
+++ b/nixos/modules/rename.nix
@@ -202,5 +202,7 @@ with lib;
       "See the 16.09 release notes for more information.")
     (mkRemovedOptionModule [ "services" "phpfpm" "phpIni" ] "")
     (mkRemovedOptionModule [ "services" "dovecot2" "package" ] "")
+    (mkRemovedOptionModule [ "services" "xserver" "displayManager" "sddm" "themes" ]
+      "Set the option `services.xserver.displayManager.sddm.package' instead.")
   ];
 }
diff --git a/nixos/modules/services/x11/desktop-managers/plasma5.nix b/nixos/modules/services/x11/desktop-managers/plasma5.nix
index f923d86265f..918841e8f16 100644
--- a/nixos/modules/services/x11/desktop-managers/plasma5.nix
+++ b/nixos/modules/services/x11/desktop-managers/plasma5.nix
@@ -208,11 +208,7 @@ in
 
       services.xserver.displayManager.sddm = {
         theme = "breeze";
-        themes = [
-          pkgs.extra-cmake-modules # for the setup-hook
-          plasma5.plasma-workspace
-          pkgs.breeze-icons
-        ];
+        package = pkgs.sddmPlasma5;
       };
 
       security.pam.services.kde = { allowNullPassword = true; };
diff --git a/nixos/modules/services/x11/display-managers/sddm.nix b/nixos/modules/services/x11/display-managers/sddm.nix
index 6630b8257e4..affc1261d19 100644
--- a/nixos/modules/services/x11/display-managers/sddm.nix
+++ b/nixos/modules/services/x11/display-managers/sddm.nix
@@ -9,7 +9,7 @@ let
   cfg = dmcfg.sddm;
   xEnv = config.systemd.services."display-manager".environment;
 
-  sddm = pkgs.sddm.override { inherit (cfg) themes; };
+  sddm = cfg.package;
 
   xserverWrapper = pkgs.writeScript "xserver-wrapper" ''
     #!/bin/sh
@@ -105,11 +105,12 @@ in
         '';
       };
 
-      themes = mkOption {
-        type = types.listOf types.package;
-        default = [];
+      package = mkOption {
+        type = types.package;
+        default = pkgs.sddm;
         description = ''
-          Extra packages providing themes.
+          The SDDM package to install.
+          The default package can be overridden to provide extra themes.
         '';
       };
 
diff --git a/pkgs/applications/display-managers/sddm/default.nix b/pkgs/applications/display-managers/sddm/default.nix
index 9fd56a49b5f..019d3e97a6f 100644
--- a/pkgs/applications/display-managers/sddm/default.nix
+++ b/pkgs/applications/display-managers/sddm/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, makeQtWrapper, fetchFromGitHub, fetchpatch
+{ stdenv, lib, makeQtWrapper, fetchFromGitHub, fetchpatch
 , cmake, extra-cmake-modules, pkgconfig, libxcb, libpthreadstubs, lndir
 , libXdmcp, libXau, qtbase, qtdeclarative, qttools, pam, systemd
 , themes
@@ -28,10 +28,13 @@ let
     nativeBuildInputs = [ cmake extra-cmake-modules pkgconfig qttools ];
 
     buildInputs = [
-      libxcb libpthreadstubs libXdmcp libXau qtbase pam systemd
+      libxcb libpthreadstubs libXdmcp libXau pam systemd
+      qtbase qtdeclarative
     ];
 
-    propagatedBuildInputs = [ qtdeclarative ];
+    propagatedUserEnvPkgs = builtins.map lib.getBin [
+      qtbase qtdeclarative
+    ];
 
     cmakeFlags = [
       "-DCONFIG_FILE=/etc/sddm.conf"
@@ -80,6 +83,21 @@ stdenv.mkDerivation {
   installPhase = ''
     runHook preInstall
 
+    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
+
     makeQtWrapper "$unwrapped/bin/sddm" "$out/bin/sddm"
 
     mkdir -p "$out/share/sddm"
diff --git a/pkgs/desktops/plasma-5/plasma-workspace/default.nix b/pkgs/desktops/plasma-5/plasma-workspace/default.nix
index 5463e017d23..8759c7d8c1e 100644
--- a/pkgs/desktops/plasma-5/plasma-workspace/default.nix
+++ b/pkgs/desktops/plasma-5/plasma-workspace/default.nix
@@ -17,12 +17,15 @@ plasmaPackage {
 
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   buildInputs = [
+    isocodes libdbusmenu libSM libXcursor pam wayland
+  ];
+  propagatedBuildInputs = [
     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
-    plasma-framework qtgraphicaleffects qtquickcontrols qtquickcontrols2
-    qtscript qtx11extras solid isocodes libdbusmenu libSM libXcursor pam wayland
+    plasma-framework solid qtgraphicaleffects qtquickcontrols qtquickcontrols2
+    qtscript qtx11extras
   ];
 
   patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
diff --git a/pkgs/development/libraries/qt-5/make-qt-wrapper-darwin.sh b/pkgs/development/libraries/qt-5/make-qt-wrapper-darwin.sh
index cc88d2ca35d..576c03d8c76 100644
--- a/pkgs/development/libraries/qt-5/make-qt-wrapper-darwin.sh
+++ b/pkgs/development/libraries/qt-5/make-qt-wrapper-darwin.sh
@@ -31,8 +31,8 @@ _makeQtWrapperSetup() {
     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"
-    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"
+    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"
 }
 
 prePhases+=(_makeQtWrapperSetup)
diff --git a/pkgs/development/libraries/qt-5/make-qt-wrapper.sh b/pkgs/development/libraries/qt-5/make-qt-wrapper.sh
index b0d0bec9e3f..d716a876526 100644
--- a/pkgs/development/libraries/qt-5/make-qt-wrapper.sh
+++ b/pkgs/development/libraries/qt-5/make-qt-wrapper.sh
@@ -29,8 +29,8 @@ _makeQtWrapperSetup() {
     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"
-    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"
+    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"
 }
 
 prePhases+=(_makeQtWrapperSetup)
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index ecafbf2de90..1f07cf3f99c 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -15470,6 +15470,13 @@ with pkgs;
     themes = [];  # extra themes, etc.
   };
 
+  sddmPlasma5 = sddm.override {
+    themes = [
+      plasma5.plasma-workspace
+      pkgs.breeze-icons
+    ];
+  };
+
   skrooge = libsForQt5.callPackage ../applications/office/skrooge {};
 
   slim = callPackage ../applications/display-managers/slim {