blob: 56013b1fceeb4fa3fdd7264234f4392b8f44f0d1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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 ];
};
})
|