1{ pkgs, ... }:
2{
3 name = "domination";
4 meta = with pkgs.lib.maintainers; {
5 maintainers = [ fgaz ];
6 };
7
8 nodes.machine =
9 { config, pkgs, ... }:
10 {
11 imports = [
12 ./common/x11.nix
13 ];
14
15 services.xserver.enable = true;
16 environment.systemPackages = [ pkgs.domination ];
17 };
18
19 enableOCR = true;
20
21 testScript = ''
22 machine.wait_for_x()
23 # Add a dummy sound card, or an error reporting popup will appear,
24 # covering the main window and preventing OCR
25 machine.execute("modprobe snd-dummy")
26 machine.execute("domination >&2 &")
27 machine.wait_for_window("Menu")
28 machine.wait_for_text(r"(New Game|Start Server|Load Game|Help Manual|Join Game|About|Play Online)")
29 machine.screenshot("screen")
30 '';
31}