1{ pkgs, ... }:
2{
3 name = "pt2-clone";
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.pt2-clone ];
17 };
18
19 enableOCR = true;
20
21 testScript = ''
22 machine.wait_for_x()
23 # Add a dummy sound card, or the program won't start
24 machine.execute("modprobe snd-dummy")
25
26 machine.execute("pt2-clone >&2 &")
27
28 machine.wait_for_window(r"ProTracker")
29 machine.sleep(5)
30 # One of the few words that actually get recognized
31 if "LENGTH" not in machine.get_screen_text():
32 raise Exception("Program did not start successfully")
33 machine.screenshot("screen")
34 '';
35}