2021-07-31 22:44:02 +00:00
|
|
|
import ./make-test-python.nix ({ lib, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
port = toString 4321;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
name = "mpv";
|
2023-04-30 14:26:18 +00:00
|
|
|
meta.maintainers = with lib.maintainers; [ zopieux ];
|
2021-07-31 22:44:02 +00:00
|
|
|
|
|
|
|
nodes.machine =
|
|
|
|
{ pkgs, ... }:
|
|
|
|
{
|
|
|
|
environment.systemPackages = [
|
|
|
|
pkgs.curl
|
2021-09-22 13:40:59 +00:00
|
|
|
(pkgs.wrapMpv pkgs.mpv-unwrapped {
|
2021-07-31 22:44:02 +00:00
|
|
|
scripts = [ pkgs.mpvScripts.simple-mpv-webui ];
|
|
|
|
})
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
2021-11-05 00:43:22 +00:00
|
|
|
machine.execute("set -m; mpv --script-opts=webui-port=${port} --idle=yes >&2 &")
|
2021-07-31 22:44:02 +00:00
|
|
|
machine.wait_for_open_port(${port})
|
|
|
|
assert "<title>simple-mpv-webui" in machine.succeed("curl -s localhost:${port}")
|
|
|
|
'';
|
|
|
|
})
|