forked from mirrors/nixpkgs
tests.plasma5: Fixes OCR in sddm by providing a custom theme
The custom theme just sets the old background colour that OCR works again.
This commit is contained in:
parent
556f670c15
commit
51bafa6471
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue