From 61b94f0dd06cac0f7dcd38cce80f2a7ab8376098 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Fri, 12 Aug 2022 22:53:53 +0300 Subject: 2022-08-12 --- packages/mpv-autosub.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 packages/mpv-autosub.nix (limited to 'packages/mpv-autosub.nix') 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"; +} -- cgit 1.4.1