2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
gitUpdater,
|
|
|
|
nodePackages,
|
|
|
|
stdenvNoCC,
|
|
|
|
}:
|
2024-01-25 14:12:00 +00:00
|
|
|
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=";
|
|
|
|
};
|
2024-05-15 15:35:15 +00:00
|
|
|
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
|
2024-01-25 14:12:00 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeBuildInputs = [ nodePackages.browserify ];
|
2024-01-25 14:12:00 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
})
|