Merge pull request #330944 from olmokramer/mpv-scripts-occivink

mpvScripts: Make more of occivink's scripts available
This commit is contained in:
Donovan Glover 2024-08-10 21:07:01 +00:00 committed by GitHub
commit ac808bfc7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 1 deletions

View File

@ -92,7 +92,12 @@ let
autodeint
autoload
;
inherit (callPackage ./occivink.nix { }) blacklistExtensions seekTo;
inherit (callPackage ./occivink.nix { })
blacklistExtensions
crop
encode
seekTo
;
buildLua = callPackage ./buildLua.nix { };
autosubsync-mpv = callPackage ./autosubsync-mpv.nix { };

View File

@ -3,6 +3,7 @@
fetchFromGitHub,
unstableGitUpdater,
buildLua,
ffmpeg,
}:
let
@ -44,6 +45,16 @@ in
lib.mapAttrs (name: lib.makeOverridable (mkScript name)) {
# Usage: `pkgs.mpv.override { scripts = [ pkgs.mpvScripts.seekTo ]; }`
crop.meta.description = "Crop the current video in a visual manner.";
seekTo.meta.description = "Mpv script for seeking to a specific position";
blacklistExtensions.meta.description = "Automatically remove playlist entries based on their extension.";
encode = {
meta.description = "Make an extract of the video currently playing using ffmpeg.";
postPatch = ''
substituteInPlace scripts/encode.lua \
--replace-fail '"ffmpeg"' '"${lib.getExe ffmpeg}"'
'';
};
}