1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 19:51:17 +00:00
nixpkgs/nixos/tests/mpv.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
616 B
Nix
Raw Normal View History

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.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}")
'';
})