mpvScripts.mpv-cheatsheet-ng: init at 0.1.0 (#490264)

This commit is contained in:
Sizhe Zhao
2026-03-01 09:12:43 +00:00
committed by GitHub
3 changed files with 28 additions and 46 deletions
+1
View File
@@ -110,6 +110,7 @@ let
encode
seekTo
; # added 2024-11-28
mpv-cheatsheet = throw "'mpv-cheatsheet' is no longer maintained, use 'mpv-cheatsheet-ng' instead"; # added 2026-02-13
youtube-quality = throw "'youtube-quality' is no longer maintained, use 'quality-menu' instead"; # added 2023-07-14
};
in
@@ -0,0 +1,27 @@
{
lib,
buildLua,
fetchFromGitHub,
gitUpdater,
}:
buildLua (finalAttrs: {
pname = "mpv-cheatsheet-ng";
version = "0.1.0";
scriptPath = "cheatsheet.lua";
src = fetchFromGitHub {
owner = "ambroisie";
repo = "mpv-cheatsheet-ng";
tag = "v${finalAttrs.version}";
hash = "sha256-5CVEf5SPNiYaKKp0tn4zhwUvP5R75HU5/B+l8KCXJNg=";
};
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
meta = {
description = "mpv script for looking up keyboard shortcuts";
homepage = "https://github.com/ambroisie/mpv-cheatsheet-ng";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.ambroisie ];
};
})
@@ -1,46 +0,0 @@
{
lib,
fetchFromGitHub,
gitUpdater,
nodePackages,
stdenvNoCC,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "mpv-cheatsheet";
version = "0.30.0.2";
src = fetchFromGitHub {
owner = "ento";
repo = "mpv-cheatsheet";
rev = "v${finalAttrs.version}";
hash = "sha256-MWK0CYto3zgn3fivmL43tvgZn6XrjPxKLp0lgTFdplM=";
};
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
nativeBuildInputs = [ nodePackages.browserify ];
buildPhase = ''
runHook preBuild
make dist/${finalAttrs.passthru.scriptName}
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -D dist/${finalAttrs.passthru.scriptName} $out/share/mpv/scripts/${finalAttrs.passthru.scriptName}
runHook postInstall
'';
passthru.scriptName = "cheatsheet.js";
meta = {
description = "mpv script for looking up keyboard shortcuts";
homepage = "https://github.com/ento/mpv-cheatsheet";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ambroisie ];
};
})