Merge branch 'plasma-5.5'

This commit is contained in:
Thomas Tuegel 2015-12-11 07:21:50 -06:00
commit 3960ecb933
11 changed files with 155 additions and 48 deletions

View File

@ -108,16 +108,26 @@ in
kdeApps.okular
kdeApps.print-manager
# Oxygen icons moved to KDE Frameworks 5.16 and later.
(kdeApps.oxygen-icons or kf5.oxygen-icons5)
pkgs.hicolor_icon_theme
plasma5.kde-gtk-config
pkgs.orion # GTK theme, nearly identical to Breeze
]
# Plasma 5.5 and later has a Breeze GTK theme.
# If it is not available, Orion is very similar to Breeze.
++ lib.optional (!(lib.hasAttr "breeze-gtk" plasma5)) pkgs.orion
# Install Breeze icons if available
++ lib.optional (lib.hasAttr "breeze-icons" kf5) kf5.breeze-icons
# Optional hardware support features
++ lib.optional config.hardware.bluetooth.enable plasma5.bluedevil
++ lib.optional config.networking.networkmanager.enable plasma5.plasma-nm
++ lib.optional config.hardware.pulseaudio.enable plasma5.plasma-pa
++ lib.optional config.powerManagement.enable plasma5.powerdevil
++ lib.optionals cfg.phonon.gstreamer.enable
[
pkgs.phonon_backend_gstreamer
@ -135,6 +145,7 @@ in
pkgs.gst_all_1.gst-plugins-bad
pkgs.gst_all_1.gst-libav # for mp3 playback
]
++ lib.optionals cfg.phonon.vlc.enable
[
pkgs.phonon_qt5_backend_vlc
@ -166,6 +177,14 @@ in
# Extra UDEV rules used by Solid
services.udev.packages = [ pkgs.media-player-info ];
services.xserver.displayManager.sddm = {
theme = "breeze";
themes = [
plasma5.plasma-workspace
(kdeApps.oxygen-icons or kf5.oxygen-icons5)
];
};
security.pam.services.kde = { allowNullPassword = true; };
};

View File

@ -9,6 +9,8 @@ let
cfg = dmcfg.sddm;
xEnv = config.systemd.services."display-manager".environment;
sddm = pkgs.sddm.override { inherit (cfg) themes; };
xserverWrapper = pkgs.writeScript "xserver-wrapper" ''
#!/bin/sh
${concatMapStrings (n: "export ${n}=\"${getAttr n xEnv}\"\n") (attrNames xEnv)}
@ -22,6 +24,8 @@ let
[Theme]
Current=${cfg.theme}
ThemeDir=${sddm}/share/sddm/themes
FacesDir=${sddm}/share/sddm/faces
[Users]
MaximumUid=${toString config.ids.uids.nixbld}
@ -86,6 +90,14 @@ in
'';
};
themes = mkOption {
type = types.listOf types.package;
default = [];
description = ''
Extra packages providing themes.
'';
};
autoLogin = mkOption {
default = {};
description = ''
@ -146,8 +158,7 @@ in
services.xserver.displayManager.job = {
logsXsession = true;
#execCmd = "${pkgs.sddm}/bin/sddm";
execCmd = "exec ${pkgs.sddm}/bin/sddm";
execCmd = "exec ${sddm}/bin/sddm";
};
security.pam.services = {

View File

@ -83,6 +83,7 @@ in rec {
(all nixos.tests.openssh)
(all nixos.tests.printing)
(all nixos.tests.proxy)
(all nixos.tests.sddm)
(all nixos.tests.simple)
(all nixos.tests.udisks2)
(all nixos.tests.xfce)

View File

@ -287,6 +287,7 @@ in rec {
tests.quake3 = callTest tests/quake3.nix {};
tests.runInMachine = callTest tests/run-in-machine.nix {};
tests.sddm = callTest tests/sddm.nix {};
tests.sddm-kde5 = callTest tests/sddm-kde5.nix {};
tests.simple = callTest tests/simple.nix {};
tests.tomcat = callTest tests/tomcat.nix {};
tests.udisks2 = callTest tests/udisks2.nix {};

29
nixos/tests/sddm-kde5.nix Normal file
View File

@ -0,0 +1,29 @@
import ./make-test.nix ({ pkgs, ...} : {
name = "sddm";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ ttuegel ];
};
machine = { lib, ... }: {
imports = [ ./common/user-account.nix ];
services.xserver.enable = true;
services.xserver.displayManager.sddm = {
enable = true;
autoLogin = {
enable = true;
user = "alice";
};
};
services.xserver.windowManager.default = "icewm";
services.xserver.windowManager.icewm.enable = true;
services.xserver.desktopManager.default = "none";
services.xserver.desktopManager.kde5.enable = true;
};
enableOCR = true;
testScript = { nodes, ... }: ''
startAll;
$machine->waitForWindow("^IceWM ");
'';
})

View File

@ -1,54 +1,80 @@
{ stdenv, fetchpatch, makeQtWrapper, fetchFromGitHub, cmake, pkgconfig, libxcb, libpthreadstubs
, libXdmcp, libXau, qtbase, qtdeclarative, qttools, pam, systemd }:
{ stdenv, makeQtWrapper, fetchFromGitHub
, cmake, pkgconfig, libxcb, libpthreadstubs, lndir
, libXdmcp, libXau, qtbase, qtdeclarative, qttools, pam, systemd
, themes
}:
let
version = "0.13.0";
unwrapped = stdenv.mkDerivation rec {
name = "sddm-unwrapped-${version}";
src = fetchFromGitHub {
owner = "sddm";
repo = "sddm";
rev = "v${version}";
sha256 = "0c3q8lpb123m9k5x3i71mm8lmyzhknw77zxh89yfl8qmn6zd61i1";
};
patches = [
./0001-ignore-config-mtime.patch
./0002-fix-ConfigReader-QStringList-corruption.patch
];
nativeBuildInputs = [ cmake pkgconfig qttools ];
buildInputs = [
libxcb libpthreadstubs libXdmcp libXau qtbase qtdeclarative pam systemd
];
cmakeFlags = [
"-DCONFIG_FILE=/etc/sddm.conf"
# Set UID_MIN and UID_MAX so that the build script won't try
# to read them from /etc/login.defs (fails in chroot).
# The values come from NixOS; they may not be appropriate
# for running SDDM outside NixOS, but that configuration is
# not supported anyway.
"-DUID_MIN=1000"
"-DUID_MAX=29999"
];
preConfigure = ''
export cmakeFlags="$cmakeFlags -DQT_IMPORTS_DIR=$out/lib/qt5/qml -DCMAKE_INSTALL_SYSCONFDIR=$out/etc -DSYSTEMD_SYSTEM_UNIT_DIR=$out/lib/systemd/system"
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
description = "QML based X11 display manager";
homepage = https://github.com/sddm/sddm;
platforms = platforms.linux;
maintainers = with maintainers; [ abbradar ttuegel ];
};
};
in
stdenv.mkDerivation rec {
stdenv.mkDerivation {
name = "sddm-${version}";
phases = "installPhase";
src = fetchFromGitHub {
owner = "sddm";
repo = "sddm";
rev = "v${version}";
sha256 = "0c3q8lpb123m9k5x3i71mm8lmyzhknw77zxh89yfl8qmn6zd61i1";
};
nativeBuildInputs = [ lndir makeQtWrapper ];
buildInputs = [ unwrapped ] ++ themes;
inherit themes;
inherit unwrapped;
patches = [
./0001-ignore-config-mtime.patch
./0002-fix-ConfigReader-QStringList-corruption.patch
];
installPhase = ''
makeQtWrapper "$unwrapped/bin/sddm" "$out/bin/sddm"
nativeBuildInputs = [ cmake makeQtWrapper pkgconfig qttools ];
buildInputs = [ libxcb libpthreadstubs libXdmcp libXau qtbase qtdeclarative pam systemd ];
cmakeFlags = [
"-DCONFIG_FILE=/etc/sddm.conf"
# Set UID_MIN and UID_MAX so that the build script won't try
# to read them from /etc/login.defs (fails in chroot).
# The values come from NixOS; they may not be appropriate
# for running SDDM outside NixOS, but that configuration is
# not supported anyway.
"-DUID_MIN=1000"
"-DUID_MAX=29999"
];
preConfigure = ''
export cmakeFlags="$cmakeFlags -DQT_IMPORTS_DIR=$out/lib/qt5/qml -DCMAKE_INSTALL_SYSCONFDIR=$out/etc -DSYSTEMD_SYSTEM_UNIT_DIR=$out/lib/systemd/system"
mkdir -p "$out/share/sddm"
for pkg in $unwrapped $themes; do
local sddmDir="$pkg/share/sddm"
if [[ -d "$sddmDir" ]]; then
lndir -silent "$sddmDir" "$out/share/sddm"
fi
done
'';
postInstall = ''
wrapQtProgram $out/bin/sddm
wrapQtProgram $out/bin/sddm-greeter
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
description = "QML based X11 display manager";
homepage = https://github.com/sddm/sddm;
platforms = platforms.linux;
maintainers = with maintainers; [ abbradar ];
};
inherit (unwrapped) meta;
}

View File

@ -0,0 +1,8 @@
{ plasmaPackage
, extra-cmake-modules
}:
plasmaPackage {
name = "breeze-gtk";
nativeBuildInputs = [ extra-cmake-modules ];
}

View File

@ -44,11 +44,12 @@ let
addPackages = self: with self; {
bluedevil = callPackage ./bluedevil.nix {};
breeze-gtk = callPackage ./breeze-gtk.nix {};
breeze-qt4 = callPackage ./breeze-qt4.nix {};
breeze-qt5 = callPackage ./breeze-qt5.nix {};
breeze =
let version = (builtins.parseDrvName breeze-qt5.name).version;
in symlinkJoin "breeze-${version}" [ breeze-qt4 breeze-qt5 ];
in symlinkJoin "breeze-${version}" [ breeze-gtk breeze-qt4 breeze-qt5 ];
kde-cli-tools = callPackage ./kde-cli-tools.nix {};
kde-gtk-config = callPackage ./kde-gtk-config {};
kdecoration = callPackage ./kdecoration.nix {};

View File

@ -0,0 +1,8 @@
{ kdeFramework
, extra-cmake-modules
}:
kdeFramework {
name = "breeze-icons";
nativeBuildInputs = [ extra-cmake-modules ];
}

View File

@ -40,6 +40,7 @@ let
attica = callPackage ./attica.nix {};
baloo = callPackage ./baloo.nix {};
bluez-qt = callPackage ./bluez-qt.nix {};
breeze-icons = callPackage ./breeze-icons.nix {};
extra-cmake-modules = callPackage ./extra-cmake-modules {};
frameworkintegration = callPackage ./frameworkintegration.nix {};
kactivities = callPackage ./kactivities.nix {};

View File

@ -13114,7 +13114,9 @@ let
printrun = callPackage ../applications/misc/printrun { };
sddm = qt5Libs.callPackage ../applications/display-managers/sddm { };
sddm = qt5Libs.callPackage ../applications/display-managers/sddm {
themes = []; # extra themes, etc.
};
slim = callPackage ../applications/display-managers/slim {
libpng = libpng12;