mpvScripts.mpv-cheatsheet: init at 0.30.0.2

This commit is contained in:
Bruno BELANYI 2023-12-16 21:43:34 +00:00
parent 64cab3aa8d
commit a8154b7733
2 changed files with 43 additions and 0 deletions

View file

@ -69,6 +69,7 @@ let
cutter = callPackage ./cutter.nix { }; cutter = callPackage ./cutter.nix { };
inhibit-gnome = callPackage ./inhibit-gnome.nix { }; inhibit-gnome = callPackage ./inhibit-gnome.nix { };
mpris = callPackage ./mpris.nix { }; mpris = callPackage ./mpris.nix { };
mpv-cheatsheet = callPackage ./mpv-cheatsheet.nix { };
mpv-playlistmanager = callPackage ./mpv-playlistmanager.nix { }; mpv-playlistmanager = callPackage ./mpv-playlistmanager.nix { };
mpv-webm = callPackage ./mpv-webm.nix { }; mpv-webm = callPackage ./mpv-webm.nix { };
mpvacious = callPackage ./mpvacious.nix { }; mpvacious = callPackage ./mpvacious.nix { };

View file

@ -0,0 +1,42 @@
{ lib, fetchFromGitHub, 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=";
};
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 = with lib; {
description = "mpv script for looking up keyboard shortcuts";
homepage = "https://github.com/ento/mpv-cheatsheet";
license = licenses.mit;
maintainers = with maintainers; [ ambroisie ];
};
})