at 23.05-pre 623 B view raw
1import ./make-test-python.nix ({ lib, ... }: 2 3with lib; 4 5let 6 port = toString 4321; 7in 8{ 9 name = "mpv"; 10 meta.maintainers = with maintainers; [ zopieux ]; 11 12 nodes.machine = 13 { pkgs, ... }: 14 { 15 environment.systemPackages = [ 16 pkgs.curl 17 (pkgs.wrapMpv pkgs.mpv-unwrapped { 18 scripts = [ pkgs.mpvScripts.simple-mpv-webui ]; 19 }) 20 ]; 21 }; 22 23 testScript = '' 24 machine.execute("set -m; mpv --script-opts=webui-port=${port} --idle=yes >&2 &") 25 machine.wait_for_open_port(${port}) 26 assert "<title>simple-mpv-webui" in machine.succeed("curl -s localhost:${port}") 27 ''; 28})