From c9e991bd649c231e673bef17dd8820b71fb90f64 Mon Sep 17 00:00:00 2001 From: Alexandre Macabies Date: Sun, 1 Aug 2021 00:44:02 +0200 Subject: mpvScripts.simple-mpv-webui: 1.0.0 -> 2.1.0 This also adds a test. The current packaged version (1.0.0) is broken, it cannot find relevant files. --- nixos/tests/mpv.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 nixos/tests/mpv.nix (limited to 'nixos/tests/mpv.nix') diff --git a/nixos/tests/mpv.nix b/nixos/tests/mpv.nix new file mode 100644 index 00000000000..bcfc17cf332 --- /dev/null +++ b/nixos/tests/mpv.nix @@ -0,0 +1,28 @@ +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.mpv-with-scripts.override { + 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 "simple-mpv-webui" in machine.succeed("curl -s localhost:${port}") + ''; +}) -- cgit 1.4.1