mpvScripts.mpv-sub-select: init at 0-unstable-2025-04-04 (#489622)

This commit is contained in:
Colin
2026-06-19 21:36:09 +00:00
committed by GitHub
2 changed files with 46 additions and 0 deletions

View File

@@ -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";

View File

@@ -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 ];
};
})