Skip to content

Commit

Permalink
mpvScripts.autosub: init at 2021-06-29
Browse files Browse the repository at this point in the history
  • Loading branch information
octvs committed Nov 17, 2024
1 parent 4788061 commit d2617ee
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
33 changes: 33 additions & 0 deletions pkgs/applications/video/mpv/scripts/autosub.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
lib,
buildLua,
fetchFromGitHub,
python3,
}:
buildLua {
pname = "mpv-autosub";
version = "0-unstable-2021-06-29";
scriptPath = "autosub.lua";

src = fetchFromGitHub {
owner = "davidde";
repo = "mpv-autosub";
rev = "35115355bd339681f97d067538356c29e5b14afa";
hash = "sha256-BKT/Tzwl5ZA4fbdc/cxz0+CYc1zyY/KOXc58x5GYow0=";
};

# passthru.updateScript = unstableGitUpdater {};

preInstall = ''
substituteInPlace autosub.lua --replace-fail \
"local subliminal = '/home/david/.local/bin/subliminal'" \
"local subliminal = '${lib.getExe' python3.pkgs.subliminal "subliminal"}'"
'';

meta = {
description = "Fully automatic subtitle downloading for the MPV media player";
homepage = "https://github.com/davidde/mpv-autosub";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.octvs ];
};
}
1 change: 1 addition & 0 deletions pkgs/applications/video/mpv/scripts/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ let
;

buildLua = callPackage ./buildLua.nix { };
autosub = callPackage ./autosub.nix { };
autosubsync-mpv = callPackage ./autosubsync-mpv.nix { };
chapterskip = callPackage ./chapterskip.nix { };
convert = callPackage ./convert.nix { };
Expand Down

0 comments on commit d2617ee

Please sign in to comment.