From 51bafa64716476d2296b3bca30ccef1f5599ab39 Mon Sep 17 00:00:00 2001 From: Bastian Köcher Date: Thu, 21 Jun 2018 14:52:54 +0200 Subject: tests.plasma5: Fixes OCR in sddm by providing a custom theme The custom theme just sets the old background colour that OCR works again. --- nixos/tests/plasma5.nix | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'nixos') diff --git a/nixos/tests/plasma5.nix b/nixos/tests/plasma5.nix index f3bd4c5915b0..14ab2e30cabf 100644 --- a/nixos/tests/plasma5.nix +++ b/nixos/tests/plasma5.nix @@ -6,13 +6,28 @@ import ./make-test.nix ({ pkgs, ...} : maintainers = [ ttuegel ]; }; - machine = { lib, ... }: { + machine = { lib, ... }: + let + sddm_theme = pkgs.stdenv.mkDerivation { + name = "breeze-ocr-theme"; + phases = "buildPhase"; + buildCommand = '' + mkdir -p $out/share/sddm/themes/ + cp -r ${pkgs.plasma-workspace}/share/sddm/themes/breeze $out/share/sddm/themes/breeze-ocr-theme + chmod -R +w $out/share/sddm/themes/breeze-ocr-theme + printf "[General]\ntype=color\ncolor=#1d99f3\nbackground=\n" > $out/share/sddm/themes/breeze-ocr-theme/theme.conf + ''; + }; + in + { imports = [ ./common/user-account.nix ]; services.xserver.enable = true; services.xserver.displayManager.sddm.enable = true; + services.xserver.displayManager.sddm.theme = "breeze-ocr-theme"; services.xserver.desktopManager.plasma5.enable = true; services.xserver.desktopManager.default = "plasma5"; virtualisation.memorySize = 1024; + environment.systemPackages = [ sddm_theme ]; # fontconfig-penultimate-0.3.3 -> 0.3.4 broke OCR apparently, but no idea why. nixpkgs.config.packageOverrides = superPkgs: { @@ -30,7 +45,6 @@ import ./make-test.nix ({ pkgs, ...} : xdo = "${pkgs.xdotool}/bin/xdotool"; in '' startAll; - # Wait for display manager to start $machine->waitForText(qr/${user.description}/); $machine->screenshot("sddm"); -- cgit 1.4.1