nixpkgs/pkgs/applications/video/mpv/scripts/quality-menu.nix
Ilan Joselevich 5a67e7be68
mpvScripts.youtube-quality: replace with mpvScripts.quality-menu v4.1.0
While at it also moved scripts attrset out of all-packages.nix so we
don't set the alias there.
2023-07-14 01:48:46 +03:00

39 lines
953 B
Nix

{ lib
, stdenvNoCC
, fetchFromGitHub
, oscSupport ? false
}:
stdenvNoCC.mkDerivation rec {
pname = "mpv-quality-menu";
version = "4.1.0";
src = fetchFromGitHub {
owner = "christoph-heinrich";
repo = "mpv-quality-menu";
rev = "v${version}";
hash = "sha256-93WoTeX61xzbjx/tgBgUVuwyR9MkAUzCfVSrbAC7Ddc=";
};
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/share/mpv/scripts
cp quality-menu.lua $out/share/mpv/scripts
'' + lib.optionalString oscSupport ''
cp quality-menu-osc.lua $out/share/mpv/scripts
'' + ''
runHook postInstall
'';
passthru.scriptName = "quality-menu.lua";
meta = with lib; {
description = "A userscript for MPV that allows you to change youtube video quality (ytdl-format) on the fly";
homepage = "https://github.com/christoph-heinrich/mpv-quality-menu";
license = licenses.gpl2Only;
maintainers = with maintainers; [ lunik1 ];
};
}