forked from mirrors/nixpkgs
mpvScripts.occivink: Add generic helper for all scripts in repo
This commit is contained in:
parent
19abbaa2d6
commit
589d611a40
40
pkgs/applications/video/mpv/scripts/occivink.nix
Normal file
40
pkgs/applications/video/mpv/scripts/occivink.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ lib
|
||||
, stdenvNoCC
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
let
|
||||
script = { name, ... }@p:
|
||||
stdenvNoCC.mkDerivation (lib.attrsets.recursiveUpdate p {
|
||||
pname = "mpv_${name}";
|
||||
passthru.scriptName = "${name}.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/${name}.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 ];
|
||||
};
|
||||
});
|
||||
|
||||
in
|
||||
{
|
||||
|
||||
# Usage: `pkgs.mpv.override { scripts = [ pkgs.mpvScripts.seekTo ]; }`
|
||||
seekTo = script { name = "seek-to"; meta.description = "Mpv script for seeking to a specific position"; };
|
||||
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
{ lib
|
||||
, stdenvNoCC
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
let
|
||||
src = fetchFromGitHub {
|
||||
owner = "occivink";
|
||||
repo = "mpv-scripts";
|
||||
rev = "af360f332897dda907644480f785336bc93facf1";
|
||||
hash = "sha256-KdCrUkJpbxxqmyUHksVVc8KdMn8ivJeUA2eerFZfEE8=";
|
||||
};
|
||||
version = "unstable-2022-10-02";
|
||||
in
|
||||
|
||||
# Usage: `pkgs.mpv.override { scripts = [ pkgs.mpvScripts.seekTo ]; }`
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "mpv_seek-to";
|
||||
passthru.scriptName = "seek-to.lua";
|
||||
inherit version src;
|
||||
|
||||
dontBuild = true;
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/mpv/scripts
|
||||
cp -r scripts/seek-to.lua $out/share/mpv/scripts/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Mpv script for seeking to a specific position";
|
||||
homepage = "https://github.com/occivink/mpv-scripts";
|
||||
license = licenses.unlicense;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ nicoo ];
|
||||
};
|
||||
}
|
|
@ -32213,7 +32213,7 @@ with pkgs;
|
|||
|
||||
mpvpaper = callPackage ../tools/wayland/mpvpaper { };
|
||||
|
||||
mpvScripts = recurseIntoAttrs {
|
||||
mpvScripts = recurseIntoAttrs ({
|
||||
acompressor = callPackage ../applications/video/mpv/scripts/acompressor.nix {};
|
||||
autoload = callPackage ../applications/video/mpv/scripts/autoload.nix { };
|
||||
convert = callPackage ../applications/video/mpv/scripts/convert.nix { };
|
||||
|
@ -32221,7 +32221,6 @@ with pkgs;
|
|||
mpris = callPackage ../applications/video/mpv/scripts/mpris.nix { };
|
||||
mpv-playlistmanager = callPackage ../applications/video/mpv/scripts/mpv-playlistmanager.nix { };
|
||||
mpvacious = callPackage ../applications/video/mpv/scripts/mpvacious.nix { };
|
||||
seekTo = callPackage ../applications/video/mpv/scripts/seek-to.nix {};
|
||||
simple-mpv-webui = callPackage ../applications/video/mpv/scripts/simple-mpv-webui.nix { };
|
||||
sponsorblock = callPackage ../applications/video/mpv/scripts/sponsorblock.nix { };
|
||||
thumbnail = callPackage ../applications/video/mpv/scripts/thumbnail.nix { };
|
||||
|
@ -32230,7 +32229,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 {}));
|
||||
|
||||
mrpeach = callPackage ../applications/audio/pd-plugins/mrpeach { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue