mpv: Move pitchcontrol script to overlay
This commit is contained in:
parent
e723e75ca8
commit
187cc904bc
|
@ -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
|
# TODO: Remove patch once mako > 1.4.1 is released and in nixpkgs
|
||||||
mako = super.mako.overrideAttrs (o: o // {
|
mako = super.mako.overrideAttrs (o: o // {
|
||||||
patches = [
|
patches = [
|
||||||
|
|
31
pkgs/mpv-scripts/pitchcontrol/default.nix
Normal file
31
pkgs/mpv-scripts/pitchcontrol/default.nix
Normal 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 ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -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 {
|
gallery-view = pkgs.fetchFromGitHub {
|
||||||
owner = "occivink";
|
owner = "occivink";
|
||||||
repo = "mpv-gallery-view";
|
repo = "mpv-gallery-view";
|
||||||
|
@ -220,11 +201,10 @@ in
|
||||||
clear-speed.af-add = "scaletempo=stride=18:overlap=.6:search=10";
|
clear-speed.af-add = "scaletempo=stride=18:overlap=.6:search=10";
|
||||||
};
|
};
|
||||||
|
|
||||||
scripts = [
|
scripts = with pkgs.mpvScripts; [
|
||||||
pitchcontrol
|
pitchcontrol
|
||||||
] ++ (with pkgs.mpvScripts; [
|
|
||||||
sponsorblock
|
sponsorblock
|
||||||
]);
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# mpv-gallery-view is not compatible with home-manager’s script injection meachanism
|
# mpv-gallery-view is not compatible with home-manager’s script injection meachanism
|
||||||
|
|
Loading…
Reference in a new issue