mpv: Move pitchcontrol script to overlay

This commit is contained in:
Simon Bruder 2021-03-20 21:07:37 +01:00
parent e723e75ca8
commit 187cc904bc
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
3 changed files with 37 additions and 22 deletions

View file

@ -33,6 +33,10 @@ in
];
});
mpvScripts = (super.mpvScripts or { }) // {
pitchcontrol = super.callPackage ./mpv-scripts/pitchcontrol { };
};
# TODO: Remove patch once mako > 1.4.1 is released and in nixpkgs
mako = super.mako.overrideAttrs (o: o // {
patches = [

View file

@ -0,0 +1,31 @@
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "pitchcontrol";
version = "0.2.0";
src = fetchFromGitHub {
owner = "FichteFoll";
repo = "mpv-scripts";
rev = "784dbafcd26455dde22175a5668c621defc14cab";
sha256 = "057vslm6ybf0b0a5s39m049pcvb204hqf6jx1640ya2r6sm335g8";
};
dontBuild = true;
installPhase = ''
runHook preInstall
install -D ${passthru.scriptName} $out/share/mpv/scripts/${passthru.scriptName}
runHook postInstall
'';
passthru.scriptName = "${pname}.lua";
meta = with lib; {
description = "An mpv script to change the pitch of audio with keybindings";
homepage = "https://github.com/FichteFoll/mpv-scripts";
license = licenses.isc;
platforms = platforms.all;
maintainers = with maintainers; [ sbruder ];
};
}

View file

@ -32,25 +32,6 @@ let
};
};
pitchcontrol = (pkgs.stdenvNoCC.mkDerivation rec {
name = "pitchcontrol.lua";
scriptName = name;
src = pkgs.fetchFromGitHub {
owner = "FichteFoll";
repo = "mpv-scripts";
rev = "28ce548e82460b1ca40d3d0149faffff97c874a0";
sha256 = "159bbkk0jj25msqyg0wq5w152g6rvm325nzg0b68qzsszz73bw5p";
};
installPhase = ''
mkdir -p $out/share/mpv/scripts/
cp pitchcontrol.lua $out/share/mpv/scripts
'';
meta.license = lib.licenses.isc;
});
gallery-view = pkgs.fetchFromGitHub {
owner = "occivink";
repo = "mpv-gallery-view";
@ -220,11 +201,10 @@ in
clear-speed.af-add = "scaletempo=stride=18:overlap=.6:search=10";
};
scripts = [
scripts = with pkgs.mpvScripts; [
pitchcontrol
] ++ (with pkgs.mpvScripts; [
sponsorblock
]);
];
};
# mpv-gallery-view is not compatible with home-managers script injection meachanism