1{
2 mkTmuxPlugin,
3 fetchFromGitHub,
4 lib,
5 check-jsonschema,
6 python3,
7}:
8mkTmuxPlugin {
9 pluginName = "tmux-which-key";
10 rtpFilePath = "plugin.sh.tmux";
11 version = "0-unstable-2024-06-08";
12 buildInputs = [
13 check-jsonschema
14 (python3.withPackages (ps: with ps; [ pyyaml ]))
15 ];
16
17 postPatch = ''
18 substituteInPlace plugin.sh.tmux --replace-fail \
19 python3 "${lib.getExe (python3.withPackages (ps: with ps; [ pyyaml ]))}"
20 '';
21
22 preInstall = ''
23 rm -rf plugin/pyyaml
24 ln -s ${python3.pkgs.pyyaml.src} plugin/pyyaml
25 '';
26
27 postInstall = ''
28 patchShebangs plugin.sh.tmux plugin/build.py
29 '';
30
31 src = fetchFromGitHub {
32 owner = "alexwforsythe";
33 repo = "tmux-which-key";
34 rev = "1f419775caf136a60aac8e3a269b51ad10b51eb6";
35 hash = "sha256-X7FunHrAexDgAlZfN+JOUJvXFZeyVj9yu6WRnxMEA8E=";
36 };
37
38 meta = {
39 homepage = "https://github.com/alexwforsythe/tmux-which-key";
40 description = "Tmux plugin that allows users to select actions from a customizable popup menu";
41 license = lib.licenses.mit;
42 platforms = lib.platforms.unix;
43 maintainers = with lib.maintainers; [ novaviper ];
44 };
45}