2021-08-05 21:33:18 +00:00
|
|
|
import ./make-test-python.nix ({ lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
port = toString 4321;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
name = "mpv";
|
|
|
|
meta.maintainers = with maintainers; [ zopieux ];
|
|
|
|
|
|
|
|
nodes.machine =
|
|
|
|
{ pkgs, ... }:
|
|
|
|
{
|
|
|
|
environment.systemPackages = [
|
|
|
|
pkgs.curl
|
2021-09-22 15:38:15 +00:00
|
|
|
(pkgs.wrapMpv pkgs.mpv-unwrapped {
|
2021-08-05 21:33:18 +00:00
|
|
|
scripts = [ pkgs.mpvScripts.simple-mpv-webui ];
|
|
|
|
})
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
|
|
|
machine.execute("set -m; mpv --script-opts=webui-port=${port} --idle=yes &")
|
|
|
|
machine.wait_for_open_port(${port})
|
|
|
|
assert "<title>simple-mpv-webui" in machine.succeed("curl -s localhost:${port}")
|
|
|
|
'';
|
|
|
|
})
|