1{ pkgs, ... }:
2{
3 name = "mindustry";
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.mindustry ];
17 };
18
19 enableOCR = true;
20
21 testScript = ''
22 machine.wait_for_x()
23 machine.execute("mindustry >&2 &")
24 machine.wait_for_window("Mindustry")
25 # Loading can take a while. Avoid wasting cycles on OCR during that time
26 machine.sleep(60)
27 machine.wait_for_text(r"(Play|Database|Editor|Mods|Settings|Quit)")
28 machine.screenshot("screen")
29 '';
30}