git.iko.soy/typeable/nixpkgs
on master help sign in
Merge branch 'plasma-5.5'
commit3960ecb9337316fad483625a5e801e5527d4c693 authorThomas Tuegel <ttuegel@gmail.com> dateFri 11 Dec 2015, 07:21 (11 years ago) parentc03b26e899c554
11 files changed+152−45
nixos/modules/services/x11/desktop-managers/kde5.nix+20−1 nixos/modules/services/x11/display-managers/sddm.nix+13−2 nixos/release-combined.nix+1 nixos/release.nix+1 nixos/tests/sddm-kde5.nix+29 pkgs/applications/display-managers/sddm/default.nix+66−40 pkgs/desktops/plasma-5.5/breeze-gtk.nix+8 pkgs/desktops/plasma-5.5/default.nix+2−1 pkgs/development/libraries/kde-frameworks-5.16/breeze-icons.nix+8 pkgs/development/libraries/kde-frameworks-5.16/default.nix+1 pkgs/top-level/all-packages.nix+3−1
nixos/modules/services/x11/desktop-managers/kde5.nix+20−1
@@ -108,16 +108,26 @@ in
108108 kdeApps.okular
109109 kdeApps.print-manager
110110
111+ # Oxygen icons moved to KDE Frameworks 5.16 and later.
111112 (kdeApps.oxygen-icons or kf5.oxygen-icons5)
112113 pkgs.hicolor_icon_theme
113114
114115 plasma5.kde-gtk-config
115− pkgs.orion # GTK theme, nearly identical to Breeze
116116 ]
117+
118+ # Plasma 5.5 and later has a Breeze GTK theme.
119+ # If it is not available, Orion is very similar to Breeze.
120+ ++ lib.optional (!(lib.hasAttr "breeze-gtk" plasma5)) pkgs.orion
121+
122+ # Install Breeze icons if available
123+ ++ lib.optional (lib.hasAttr "breeze-icons" kf5) kf5.breeze-icons
124+
125+ # Optional hardware support features
117126 ++ lib.optional config.hardware.bluetooth.enable plasma5.bluedevil
118127 ++ lib.optional config.networking.networkmanager.enable plasma5.plasma-nm
119128 ++ lib.optional config.hardware.pulseaudio.enable plasma5.plasma-pa
120129 ++ lib.optional config.powerManagement.enable plasma5.powerdevil
130+
121131 ++ lib.optionals cfg.phonon.gstreamer.enable
122132 [
123133 pkgs.phonon_backend_gstreamer
@@ -135,6 +145,7 @@ in
135145 pkgs.gst_all_1.gst-plugins-bad
136146 pkgs.gst_all_1.gst-libav # for mp3 playback
137147 ]
148+
138149 ++ lib.optionals cfg.phonon.vlc.enable
139150 [
140151 pkgs.phonon_qt5_backend_vlc
@@ -166,6 +177,14 @@ in
166177 # Extra UDEV rules used by Solid
167178 services.udev.packages = [ pkgs.media-player-info ];
168179
180+ services.xserver.displayManager.sddm = {
181+ theme = "breeze";
182+ themes = [
183+ plasma5.plasma-workspace
184+ (kdeApps.oxygen-icons or kf5.oxygen-icons5)
185+ ];
186+ };
187+
169188 security.pam.services.kde = { allowNullPassword = true; };
170189
171190 };
nixos/modules/services/x11/display-managers/sddm.nix+13−2
@@ -9,6 +9,8 @@ let
99 cfg = dmcfg.sddm;
1010 xEnv = config.systemd.services."display-manager".environment;
1111
12+ sddm = pkgs.sddm.override { inherit (cfg) themes; };
13+
1214 xserverWrapper = pkgs.writeScript "xserver-wrapper" ''
1315 #!/bin/sh
1416 ${concatMapStrings (n: "export ${n}=\"${getAttr n xEnv}\"\n") (attrNames xEnv)}
@@ -22,6 +24,8 @@ let
2224
2325 [Theme]
2426 Current=${cfg.theme}
27+ ThemeDir=${sddm}/share/sddm/themes
28+ FacesDir=${sddm}/share/sddm/faces
2529
2630 [Users]
2731 MaximumUid=${toString config.ids.uids.nixbld}
@@ -86,6 +90,14 @@ in
8690 '';
8791 };
8892
93+ themes = mkOption {
94+ type = types.listOf types.package;
95+ default = [];
96+ description = ''
97+ Extra packages providing themes.
98+ '';
99+ };
100+
89101 autoLogin = mkOption {
90102 default = {};
91103 description = ''
@@ -146,8 +158,7 @@ in
146158 services.xserver.displayManager.job = {
147159 logsXsession = true;
148160
149− #execCmd = "${pkgs.sddm}/bin/sddm";
150− execCmd = "exec ${pkgs.sddm}/bin/sddm";
161+ execCmd = "exec ${sddm}/bin/sddm";
151162 };
152163
153164 security.pam.services = {
nixos/release-combined.nix+1
@@ -83,6 +83,7 @@ in rec {
8383 (all nixos.tests.openssh)
8484 (all nixos.tests.printing)
8585 (all nixos.tests.proxy)
86+ (all nixos.tests.sddm)
8687 (all nixos.tests.simple)
8788 (all nixos.tests.udisks2)
8889 (all nixos.tests.xfce)
nixos/release.nix+1
@@ -287,6 +287,7 @@ in rec {
287287 tests.quake3 = callTest tests/quake3.nix {};
288288 tests.runInMachine = callTest tests/run-in-machine.nix {};
289289 tests.sddm = callTest tests/sddm.nix {};
290+ tests.sddm-kde5 = callTest tests/sddm-kde5.nix {};
290291 tests.simple = callTest tests/simple.nix {};
291292 tests.tomcat = callTest tests/tomcat.nix {};
292293 tests.udisks2 = callTest tests/udisks2.nix {};
nixos/tests/sddm-kde5.nixnew file+29
@@ -0,0 +1,29 @@
1+import ./make-test.nix ({ pkgs, ...} : {
2+ name = "sddm";
3+ meta = with pkgs.stdenv.lib.maintainers; {
4+ maintainers = [ ttuegel ];
5+ };
6+
7+ machine = { lib, ... }: {
8+ imports = [ ./common/user-account.nix ];
9+ services.xserver.enable = true;
10+ services.xserver.displayManager.sddm = {
11+ enable = true;
12+ autoLogin = {
13+ enable = true;
14+ user = "alice";
15+ };
16+ };
17+ services.xserver.windowManager.default = "icewm";
18+ services.xserver.windowManager.icewm.enable = true;
19+ services.xserver.desktopManager.default = "none";
20+ services.xserver.desktopManager.kde5.enable = true;
21+ };
22+
23+ enableOCR = true;
24+
25+ testScript = { nodes, ... }: ''
26+ startAll;
27+ $machine->waitForWindow("^IceWM ");
28+ '';
29+})
pkgs/applications/display-managers/sddm/default.nix+66−40
@@ -1,54 +1,80 @@
1−{ stdenv, fetchpatch, makeQtWrapper, fetchFromGitHub, cmake, pkgconfig, libxcb, libpthreadstubs
2−, libXdmcp, libXau, qtbase, qtdeclarative, qttools, pam, systemd }:
1+{ stdenv, makeQtWrapper, fetchFromGitHub
2+, cmake, pkgconfig, libxcb, libpthreadstubs, lndir
3+, libXdmcp, libXau, qtbase, qtdeclarative, qttools, pam, systemd
4+, themes
5+}:
36
47let
58 version = "0.13.0";
6−in
7−stdenv.mkDerivation rec {
8− name = "sddm-${version}";
99
10− src = fetchFromGitHub {
11− owner = "sddm";
12− repo = "sddm";
13− rev = "v${version}";
14− sha256 = "0c3q8lpb123m9k5x3i71mm8lmyzhknw77zxh89yfl8qmn6zd61i1";
15− };
10+ unwrapped = stdenv.mkDerivation rec {
11+ name = "sddm-unwrapped-${version}";
1612
17− patches = [
18− ./0001-ignore-config-mtime.patch
19− ./0002-fix-ConfigReader-QStringList-corruption.patch
20− ];
13+ src = fetchFromGitHub {
14+ owner = "sddm";
15+ repo = "sddm";
16+ rev = "v${version}";
17+ sha256 = "0c3q8lpb123m9k5x3i71mm8lmyzhknw77zxh89yfl8qmn6zd61i1";
18+ };
2119
22− nativeBuildInputs = [ cmake makeQtWrapper pkgconfig qttools ];
20+ patches = [
21+ ./0001-ignore-config-mtime.patch
22+ ./0002-fix-ConfigReader-QStringList-corruption.patch
23+ ];
2324
24− buildInputs = [ libxcb libpthreadstubs libXdmcp libXau qtbase qtdeclarative pam systemd ];
25+ nativeBuildInputs = [ cmake pkgconfig qttools ];
2526
26− cmakeFlags = [
27− "-DCONFIG_FILE=/etc/sddm.conf"
28− # Set UID_MIN and UID_MAX so that the build script won't try
29− # to read them from /etc/login.defs (fails in chroot).
30− # The values come from NixOS; they may not be appropriate
31− # for running SDDM outside NixOS, but that configuration is
32− # not supported anyway.
33− "-DUID_MIN=1000"
34− "-DUID_MAX=29999"
35− ];
27+ buildInputs = [
28+ libxcb libpthreadstubs libXdmcp libXau qtbase qtdeclarative pam systemd
29+ ];
3630
37− preConfigure = ''
38− export cmakeFlags="$cmakeFlags -DQT_IMPORTS_DIR=$out/lib/qt5/qml -DCMAKE_INSTALL_SYSCONFDIR=$out/etc -DSYSTEMD_SYSTEM_UNIT_DIR=$out/lib/systemd/system"
39− '';
31+ cmakeFlags = [
32+ "-DCONFIG_FILE=/etc/sddm.conf"
33+ # Set UID_MIN and UID_MAX so that the build script won't try
34+ # to read them from /etc/login.defs (fails in chroot).
35+ # The values come from NixOS; they may not be appropriate
36+ # for running SDDM outside NixOS, but that configuration is
37+ # not supported anyway.
38+ "-DUID_MIN=1000"
39+ "-DUID_MAX=29999"
40+ ];
4041
41− postInstall = ''
42− wrapQtProgram $out/bin/sddm
43− wrapQtProgram $out/bin/sddm-greeter
44− '';
42+ preConfigure = ''
43+ export cmakeFlags="$cmakeFlags -DQT_IMPORTS_DIR=$out/lib/qt5/qml -DCMAKE_INSTALL_SYSCONFDIR=$out/etc -DSYSTEMD_SYSTEM_UNIT_DIR=$out/lib/systemd/system"
44+ '';
4545
46− enableParallelBuilding = true;
46+ enableParallelBuilding = true;
4747
48− meta = with stdenv.lib; {
49− description = "QML based X11 display manager";
50− homepage = https://github.com/sddm/sddm;
51− platforms = platforms.linux;
52− maintainers = with maintainers; [ abbradar ];
48+ meta = with stdenv.lib; {
49+ description = "QML based X11 display manager";
50+ homepage = https://github.com/sddm/sddm;
51+ platforms = platforms.linux;
52+ maintainers = with maintainers; [ abbradar ttuegel ];
53+ };
5354 };
55+
56+in
57+
58+stdenv.mkDerivation {
59+ name = "sddm-${version}";
60+ phases = "installPhase";
61+
62+ nativeBuildInputs = [ lndir makeQtWrapper ];
63+ buildInputs = [ unwrapped ] ++ themes;
64+ inherit themes;
65+ inherit unwrapped;
66+
67+ installPhase = ''
68+ makeQtWrapper "$unwrapped/bin/sddm" "$out/bin/sddm"
69+
70+ mkdir -p "$out/share/sddm"
71+ for pkg in $unwrapped $themes; do
72+ local sddmDir="$pkg/share/sddm"
73+ if [[ -d "$sddmDir" ]]; then
74+ lndir -silent "$sddmDir" "$out/share/sddm"
75+ fi
76+ done
77+ '';
78+
79+ inherit (unwrapped) meta;
5480}
pkgs/desktops/plasma-5.5/breeze-gtk.nixnew file+8
@@ -0,0 +1,8 @@
1+{ plasmaPackage
2+, extra-cmake-modules
3+}:
4+
5+plasmaPackage {
6+ name = "breeze-gtk";
7+ nativeBuildInputs = [ extra-cmake-modules ];
8+}
pkgs/desktops/plasma-5.5/default.nix+2−1
@@ -44,11 +44,12 @@ let
4444
4545 addPackages = self: with self; {
4646 bluedevil = callPackage ./bluedevil.nix {};
47+ breeze-gtk = callPackage ./breeze-gtk.nix {};
4748 breeze-qt4 = callPackage ./breeze-qt4.nix {};
4849 breeze-qt5 = callPackage ./breeze-qt5.nix {};
4950 breeze =
5051 let version = (builtins.parseDrvName breeze-qt5.name).version;
51− in symlinkJoin "breeze-${version}" [ breeze-qt4 breeze-qt5 ];
52+ in symlinkJoin "breeze-${version}" [ breeze-gtk breeze-qt4 breeze-qt5 ];
5253 kde-cli-tools = callPackage ./kde-cli-tools.nix {};
5354 kde-gtk-config = callPackage ./kde-gtk-config {};
5455 kdecoration = callPackage ./kdecoration.nix {};
pkgs/development/libraries/kde-frameworks-5.16/breeze-icons.nixnew file+8
@@ -0,0 +1,8 @@
1+{ kdeFramework
2+, extra-cmake-modules
3+}:
4+
5+kdeFramework {
6+ name = "breeze-icons";
7+ nativeBuildInputs = [ extra-cmake-modules ];
8+}
pkgs/development/libraries/kde-frameworks-5.16/default.nix+1
@@ -40,6 +40,7 @@ let
4040 attica = callPackage ./attica.nix {};
4141 baloo = callPackage ./baloo.nix {};
4242 bluez-qt = callPackage ./bluez-qt.nix {};
43+ breeze-icons = callPackage ./breeze-icons.nix {};
4344 extra-cmake-modules = callPackage ./extra-cmake-modules {};
4445 frameworkintegration = callPackage ./frameworkintegration.nix {};
4546 kactivities = callPackage ./kactivities.nix {};
pkgs/top-level/all-packages.nix+3−1
@@ -13114,7 +13114,9 @@ let
1311413114
1311513115 printrun = callPackage ../applications/misc/printrun { };
1311613116
13117− sddm = qt5Libs.callPackage ../applications/display-managers/sddm { };
13117+ sddm = qt5Libs.callPackage ../applications/display-managers/sddm {
13118+ themes = []; # extra themes, etc.
13119+ };
1311813120
1311913121 slim = callPackage ../applications/display-managers/slim {
1312013122 libpng = libpng12;