diff options
author | Azat Bahawi <azat@bahawi.net> | 2022-08-12 22:53:53 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2022-08-12 22:53:53 +0300 |
commit | 61b94f0dd06cac0f7dcd38cce80f2a7ab8376098 (patch) | |
tree | b703a9fe11eae6c4cae4e4682f02caf0caa171d0 /packages/mpv-autosub.nix |
2022-08-12
Diffstat (limited to '')
-rw-r--r-- | packages/mpv-autosub.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/packages/mpv-autosub.nix b/packages/mpv-autosub.nix new file mode 100644 index 0000000..cebab76 --- /dev/null +++ b/packages/mpv-autosub.nix @@ -0,0 +1,28 @@ +{ + fetchFromGitHub, + python3Packages, + stdenvNoCC, +}: +stdenvNoCC.mkDerivation rec { + pname = "mpv-autosub"; + version = "unstable-"; + + src = fetchFromGitHub { + owner = "davidde"; + repo = pname; + rev = "35115355bd339681f97d067538356c29e5b14afa"; + hash = "sha256-BKT/Tzwl5ZA4fbdc/cxz0+CYc1zyY/KOXc58x5GYow0="; + }; + + postPatch = '' + substituteInPlace autosub.lua \ + --replace '/home/david/.local/bin/subliminal' \ + '${python3Packages.subliminal}/bin/subliminal' + ''; + + installPhase = '' + install -Dm644 autosub.lua $out/share/mpv/scripts/autosub.lua + ''; + + passthru.scriptName = "autosub.lua"; +} |