ocamlPackages.cpdf: 2.7.1 → 2.8 (#376363)
[NixPkgs.git] / pkgs / applications / video / mpv / scripts / autosub.nix
blob9f11ff840c9c9463581a4505f8913515d0f08ac0
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";
13   src = fetchFromGitHub {
14     owner = "davidde";
15     repo = "mpv-autosub";
16     rev = "35115355bd339681f97d067538356c29e5b14afa";
17     hash = "sha256-BKT/Tzwl5ZA4fbdc/cxz0+CYc1zyY/KOXc58x5GYow0=";
18   };
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   '';
26   passthru.updateScript = unstableGitUpdater { };
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   };