From f862ae2e3137702ca3df7c1cea80f28431df492f Mon Sep 17 00:00:00 2001 From: 1sixth <1sixth@shinta.ro> Date: Mon, 10 Jun 2024 01:19:06 +0800 Subject: [PATCH 1/2] nixos/tests/mpv: adapt to the new mpv wrapper --- nixos/tests/mpv.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/tests/mpv.nix b/nixos/tests/mpv.nix index 32a81cbe2495..c2e151c22476 100644 --- a/nixos/tests/mpv.nix +++ b/nixos/tests/mpv.nix @@ -12,7 +12,7 @@ in { environment.systemPackages = [ pkgs.curl - (pkgs.wrapMpv pkgs.mpv-unwrapped { + (pkgs.mpv.override { scripts = [ pkgs.mpvScripts.simple-mpv-webui ]; }) ]; From 54072d588d367675e4261eb2da42923117b54a1d Mon Sep 17 00:00:00 2001 From: 1sixth <1sixth@shinta.ro> Date: Mon, 10 Jun 2024 09:37:33 +0800 Subject: [PATCH 2/2] mpv: allow ofborg to execute the test Co-authored-by: Mario Rodas --- pkgs/applications/video/mpv/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/applications/video/mpv/default.nix b/pkgs/applications/video/mpv/default.nix index b5672d7afa46..4600cfb48cb6 100644 --- a/pkgs/applications/video/mpv/default.nix +++ b/pkgs/applications/video/mpv/default.nix @@ -50,6 +50,7 @@ meson, mujs, ninja, + nixosTests, nv-codec-headers-11, openalSoft, pipewire, @@ -60,6 +61,7 @@ speex, stdenv, swift, + testers, vapoursynth, vulkan-headers, vulkan-loader, @@ -351,6 +353,18 @@ stdenv'.mkDerivation (finalAttrs: { wrapper = callPackage ./wrapper.nix { }; scripts = callPackage ./scripts { }; + + tests = { + inherit (nixosTests) mpv; + + version = testers.testVersion { + package = finalAttrs.finalPackage; + }; + pkg-config = testers.hasPkgConfigModules { + package = finalAttrs.finalPackage; + moduleNames = [ "mpv" ]; + }; + }; }; meta = {