mpv: add scriptOpts option, fix tests (#3491)

This commit is contained in:
Chuang Zhu 2023-03-21 18:33:36 +08:00 committed by GitHub
parent a8f5ca239f
commit e386ec640e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 53 additions and 18 deletions

View file

@ -1,5 +1,5 @@
{
# Temporarily commented until fixed for recent changes in Nixpkgs.
# mpv-example-settings = ./mpv-example-settings.nix;
# mpv-invalid-settings = ./mpv-invalid-settings.nix;
mpv-example-settings = ./mpv-example-settings.nix;
mpv-invalid-settings = ./mpv-invalid-settings.nix;
}

View file

@ -0,0 +1,3 @@
scalewindowed=2.000000
vidscale=no
visibility=always

View file

@ -18,6 +18,14 @@
cache-default = 4000000;
};
scriptOpts = {
osc = {
scalewindowed = 2.0;
vidscale = false;
visibility = "always";
};
};
profiles = {
fast = { vo = "vdpau"; };
"protocol.dvd" = {
@ -38,6 +46,9 @@
assertFileContent \
home-files/.config/mpv/input.conf \
${./mpv-example-settings-expected-bindings}
assertFileContent \
home-files/.config/mpv/script-opts/osc.conf \
${./mpv-example-settings-expected-osc-opts}
'';
};

View file

@ -10,24 +10,12 @@
nixpkgs.overlays = [
(self: super: {
mpv-unwrapped = pkgs.runCommandLocal "mpv" {
version = "0";
passthru = {
lua.luaversion = "0";
luaEnv = "/dummy";
vapoursynthSupport = false;
};
} ''
mkdir -p $out/bin $out/Applications/mpv.app/Contents/MacOS
touch $out/bin/{,u}mpv $out/Applications/mpv.app/Contents/MacOS/mpv
chmod 755 $out/bin/{,u}mpv $out/Applications/mpv.app/Contents/MacOS/mpv
'';
mpvDummy = config.lib.test.mkStubPackage { };
mpvScript =
pkgs.runCommandLocal "mpvScript" { scriptName = "something"; }
"mkdir $out";
})
];
test.stubs.mpvDummy = { };
test.asserts.assertions.expected = [
''