mpvScripts.autosubsync: init at unstable-2022-12-16 (#226938)

This commit is contained in:
Kovacsics Robert 2024-05-29 17:25:34 +01:00 committed by GitHub
parent e6154cf402
commit 6684eb5f09
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,38 @@
{
lib,
fetchFromGitHub,
buildLua,
alass,
}:
buildLua {
pname = "autosubsync-mpv";
version = "0-unstable-2022-12-26";
src = fetchFromGitHub {
owner = "joaquintorres";
repo = "autosubsync-mpv";
rev = "22cb928ecd94cc8cadaf8c354438123c43e0c70d";
sha256 = "sha256-XQPFC7l9MTZAW5FfULRQJfu/7FuGj9bbjQUZhNv0rlc=";
};
# While nixpkgs only packages alass, we might as well make that the default
patchPhase = ''
runHook prePatch
substituteInPlace autosubsync.lua \
--replace-warn 'alass_path = ""' 'alass_path = "${alass}/bin/alass-cli"' \
--replace-warn 'audio_subsync_tool = "ask"' 'audio_subsync_tool = "alass"' \
--replace-warn 'altsub_subsync_tool = "ask"' 'altsub_subsync_tool = "alass"'
runHook postPatch
'';
scriptPath = "./";
passthru.scriptName = "autosubsync-mpv";
meta = with lib; {
description = "Automatically sync subtitles in mpv using the `n` button";
homepage = "https://github.com/joaquintorres/autosubsync-mpv";
maintainers = with maintainers; [ kovirobi ];
license = licenses.mit;
};
}

View File

@ -95,6 +95,7 @@ let
inherit (callPackage ./occivink.nix { }) blacklistExtensions seekTo;
buildLua = callPackage ./buildLua.nix { };
autosubsync-mpv = callPackage ./autosubsync-mpv.nix { };
chapterskip = callPackage ./chapterskip.nix { };
convert = callPackage ./convert.nix { };
cutter = callPackage ./cutter.nix { };