My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/nixos/tests/mpv.nix

28 lines
623 B

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
(pkgs.wrapMpv pkgs.mpv-unwrapped {
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}")
'';
})