bcb2f287e1
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
26 lines
602 B
Nix
26 lines
602 B
Nix
import ./make-test-python.nix ({ lib, ... }:
|
|
|
|
let
|
|
port = toString 4321;
|
|
in
|
|
{
|
|
name = "mpv";
|
|
meta.maintainers = with lib.maintainers; [ zopieux ];
|
|
|
|
nodes.machine =
|
|
{ pkgs, ... }:
|
|
{
|
|
environment.systemPackages = [
|
|
pkgs.curl
|
|
(pkgs.mpv.override {
|
|
scripts = [ pkgs.mpvScripts.simple-mpv-webui ];
|
|
})
|
|
];
|
|
};
|
|
|
|
testScript = ''
|
|
machine.execute("set -m; mpv --script-opts=webui-port=${port} --idle=yes >&2 &")
|
|
machine.wait_for_open_port(${port})
|
|
assert "<title>simple-mpv-webui" in machine.succeed("curl -s localhost:${port}")
|
|
'';
|
|
})
|