diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 387eb191a342..64f8c9c31512 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -16055,6 +16055,13 @@ name = "Bernardo Meurer"; keys = [ { fingerprint = "F193 7596 57D5 6DA4 CCD4 786B F4C0 D53B 8D14 C246"; } ]; }; + lovistovis = { + email = "love.lysell.berglund@gmail.com"; + github = "lovistovis"; + githubId = 64896699; + name = "Love Lysell Berglund"; + keys = [ { fingerprint = "7958 2B47 1D85 3CC9 A3FB 30D5 7B54 D564 D46D 9880"; } ]; + }; lowfatcomputing = { email = "andreas.wagner@lowfatcomputing.org"; github = "lowfatcomputing"; diff --git a/pkgs/by-name/mp/mpv/scripts/mpv-sub-select.nix b/pkgs/by-name/mp/mpv/scripts/mpv-sub-select.nix new file mode 100644 index 000000000000..9b7570e52c8d --- /dev/null +++ b/pkgs/by-name/mp/mpv/scripts/mpv-sub-select.nix @@ -0,0 +1,39 @@ +{ + lib, + buildLua, + fetchFromGitHub, + nix-update-script, +}: + +buildLua (finalAttrs: { + pname = "mpv-sub-select"; + version = "0-unstable-2025-04-04"; + + scriptPath = "sub-select.lua"; + src = fetchFromGitHub { + owner = "CogentRedTester"; + repo = "mpv-sub-select"; + rev = "26d24a0fd1d69988eaedda6056a2c87d0a55b6cb"; + hash = "sha256-+eVga4b7KIBnfrtmlgq/0HNjQVS3SK6YWVXCPvOeOOc="; + }; + + postPatch = '' + # changes default sub-select.json search location + substituteInPlace sub-select.lua \ + --replace-fail '~~/script-opts' '${placeholder "out"}/share/mpv/script-opts' + ''; + + postInstall = '' + mkdir '${placeholder "out"}/share/mpv/script-opts' + cp sub-select.json '${placeholder "out"}/share/mpv/script-opts' + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "An advanced conditional subtitle track selector for mpv player"; + homepage = "https://github.com/CogentRedTester/mpv-sub-select"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ lovistovis ]; + }; +})