Skip to content

Commit a3a6786

Browse files
Merge #356158: init mpvScripts.autosub at 0-unstable-2021-06-29
2 parents 582cd0d + 8a8e349 commit a3a6786

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
lib,
3+
buildLua,
4+
fetchFromGitHub,
5+
unstableGitUpdater,
6+
python3Packages,
7+
}:
8+
buildLua {
9+
pname = "mpv-autosub";
10+
version = "0-unstable-2021-06-29";
11+
scriptPath = "autosub.lua";
12+
13+
src = fetchFromGitHub {
14+
owner = "davidde";
15+
repo = "mpv-autosub";
16+
rev = "35115355bd339681f97d067538356c29e5b14afa";
17+
hash = "sha256-BKT/Tzwl5ZA4fbdc/cxz0+CYc1zyY/KOXc58x5GYow0=";
18+
};
19+
20+
preInstall = ''
21+
substituteInPlace autosub.lua --replace-fail \
22+
"local subliminal = '/home/david/.local/bin/subliminal'" \
23+
"local subliminal = '${lib.getExe' python3Packages.subliminal "subliminal"}'"
24+
'';
25+
26+
passthru.updateScript = unstableGitUpdater { };
27+
28+
meta = {
29+
description = "Fully automatic subtitle downloading for the MPV media player";
30+
homepage = "https://github.com/davidde/mpv-autosub";
31+
license = lib.licenses.mit;
32+
maintainers = [ lib.maintainers.octvs ];
33+
};
34+
}

pkgs/applications/video/mpv/scripts/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ let
9898
;
9999

100100
buildLua = callPackage ./buildLua.nix { };
101+
autosub = callPackage ./autosub.nix { };
101102
autosubsync-mpv = callPackage ./autosubsync-mpv.nix { };
102103
chapterskip = callPackage ./chapterskip.nix { };
103104
convert = callPackage ./convert.nix { };

0 commit comments

Comments
 (0)