diff options
author | Alexandre Macabies <web+oss@zopieux.com> | 2021-08-01 00:44:02 +0200 |
---|---|---|
committer | Alexandre Macabies <web+oss@zopieux.com> | 2021-08-01 00:47:55 +0200 |
commit | c9e991bd649c231e673bef17dd8820b71fb90f64 (patch) | |
tree | 6c0e294570b33066416fe7f061ead51c3c7bf70b /nixos/tests/mpv.nix | |
parent | 35859a355b5ad33f7364e1928a7da4317f3501b1 (diff) | |
download | nixpkgs-c9e991bd649c231e673bef17dd8820b71fb90f64.tar nixpkgs-c9e991bd649c231e673bef17dd8820b71fb90f64.tar.gz nixpkgs-c9e991bd649c231e673bef17dd8820b71fb90f64.tar.bz2 nixpkgs-c9e991bd649c231e673bef17dd8820b71fb90f64.tar.lz nixpkgs-c9e991bd649c231e673bef17dd8820b71fb90f64.tar.xz nixpkgs-c9e991bd649c231e673bef17dd8820b71fb90f64.tar.zst nixpkgs-c9e991bd649c231e673bef17dd8820b71fb90f64.zip |
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.
Diffstat (limited to 'nixos/tests/mpv.nix')
-rw-r--r-- | nixos/tests/mpv.nix | 28 |
1 files changed, 28 insertions, 0 deletions
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 "<title>simple-mpv-webui" in machine.succeed("curl -s localhost:${port}") + ''; +}) |