mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
mpvScripts.autosubsync: init at unstable-2022-12-16 (#226938)
This commit is contained in:
parent
e6154cf402
commit
6684eb5f09
38
pkgs/applications/video/mpv/scripts/autosubsync-mpv.nix
Normal file
38
pkgs/applications/video/mpv/scripts/autosubsync-mpv.nix
Normal 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;
|
||||
};
|
||||
}
|
@ -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 { };
|
||||
|
Loading…
Reference in New Issue
Block a user