Merge pull request #219349 from nbraud/mpvScript/seekTo

mpvScripts.{blacklistExtensions, seekTo}: Init at unstable-2022-10-02
This commit is contained in:
Maciej Krüger 2023-05-25 17:54:24 +02:00 committed by GitHub
commit bd4452f0a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 55 additions and 2 deletions

View File

@ -0,0 +1,53 @@
{ lib
, stdenvNoCC
, fetchFromGitHub
}:
let
script = { n, ... }@p:
stdenvNoCC.mkDerivation (lib.attrsets.recursiveUpdate {
pname = "mpv_${n}";
passthru.scriptName = "${n}.lua";
src = fetchFromGitHub {
owner = "occivink";
repo = "mpv-scripts";
rev = "af360f332897dda907644480f785336bc93facf1";
hash = "sha256-KdCrUkJpbxxqmyUHksVVc8KdMn8ivJeUA2eerFZfEE8=";
};
version = "unstable-2022-10-02";
dontBuild = true;
installPhase = ''
mkdir -p $out/share/mpv/scripts
cp -r scripts/${n}.lua $out/share/mpv/scripts/
'';
meta = with lib; {
homepage = "https://github.com/occivink/mpv-scripts";
license = licenses.unlicense;
platforms = platforms.all;
maintainers = with maintainers; [ nicoo ];
};
outputHashAlgo = "sha256";
outputHashMode = "recursive";
} p);
in
{
# Usage: `pkgs.mpv.override { scripts = [ pkgs.mpvScripts.seekTo ]; }`
seekTo = script {
n = "seek-to";
meta.description = "Mpv script for seeking to a specific position";
outputHash = "sha256-3RlbtUivmeoR9TZ6rABiZSd5jd2lFv/8p/4irHMLshs=";
};
blacklistExtensions = script {
n = "blacklist-extensions";
meta.description = "Automatically remove playlist entries based on their extension.";
outputHash = "sha256-qw9lz8ofmvvh23F9aWLxiU4YofY+YflRETu+nxMhvVE=";
};
}

View File

@ -32689,7 +32689,7 @@ with pkgs;
mpvpaper = callPackage ../tools/wayland/mpvpaper { };
mpvScripts = recurseIntoAttrs {
mpvScripts = recurseIntoAttrs ({
acompressor = callPackage ../applications/video/mpv/scripts/acompressor.nix {};
autocrop = callPackage ../applications/video/mpv/scripts/autocrop.nix { };
autodeint = callPackage ../applications/video/mpv/scripts/autodeint.nix { };
@ -32708,7 +32708,7 @@ with pkgs;
webtorrent-mpv-hook = callPackage ../applications/video/mpv/scripts/webtorrent-mpv-hook.nix { };
youtube-quality = callPackage ../applications/video/mpv/scripts/youtube-quality.nix { };
cutter = callPackage ../applications/video/mpv/scripts/cutter.nix { };
};
} // (callPackage ../applications/video/mpv/scripts/occivink.nix {}));
open-in-mpv = callPackage ../applications/video/open-in-mpv { };