1 { lib, stdenv, fetchFromGitHub, fetchFromGitLab, fetchgit
2 , buildKakounePluginFrom2Nix
3 , kakoune-lsp, parinfer-rust, rep
4 , fzf, git, guile, kakoune-unwrapped, lua5_3, plan9port
9 inherit kakoune-lsp parinfer-rust rep;
11 case-kak = buildKakounePluginFrom2Nix {
13 version = "2020-04-06";
14 src = fetchFromGitLab {
15 owner = "FlyingWombat";
17 rev = "6f1511820aa3abfa118e0f856118adc8113e2185";
18 sha256 = "002njrlwgakqgp74wivbppr9qyn57dn4n5bxkr6k6nglk9qndwdp";
20 meta.homepage = "https://gitlab.com/FlyingWombat/case.kak";
23 fzf-kak = super.fzf-kak.overrideAttrs(oldAttrs: rec {
25 if [[ -x "${fzf}/bin/fzf" ]]; then
26 fzfImpl='${fzf}/bin/fzf'
28 fzfImpl='${fzf}/bin/sk'
31 substituteInPlace $out/share/kak/autoload/plugins/fzf-kak/rc/fzf.kak \
32 --replace \'fzf\' \'"$fzfImpl"\'
36 kak-ansi = stdenv.mkDerivation rec {
40 src = fetchFromGitHub {
44 sha256 = "kFjTYFy0KF5WWEHU4hHFAnD/03/d3ptjqMMbTSaGImE=";
48 mkdir -p $out/bin $out/share/kak/autoload/plugins/
49 cp kak-ansi-filter $out/bin/
50 # Hard-code path of filter and don't try to build when Kakoune boots
52 /^declare-option.* ansi_filter /i\
53 declare-option -hidden str ansi_filter %{'"$out"'/bin/kak-ansi-filter}
54 /^declare-option.* ansi_filter /,/^}/d
55 ' rc/ansi.kak >$out/share/kak/autoload/plugins/ansi.kak
59 description = "Kakoune support for rendering ANSI code";
60 homepage = "https://github.com/eraserhd/kak-ansi";
61 license = licenses.unlicense;
62 maintainers = with maintainers; [ eraserhd philiptaron ];
63 platforms = platforms.all;
67 kak-plumb = stdenv.mkDerivation rec {
71 src = fetchFromGitHub {
75 sha256 = "1rz6pr786slnf1a78m3sj09axr4d2lb5rg7sfa4mfg1zcjh06ps6";
79 mkdir -p $out/bin $out/share/kak/autoload/plugins/
80 substitute rc/plumb.kak $out/share/kak/autoload/plugins/plumb.kak \
81 --replace '9 plumb' '${plan9port}/bin/9 plumb'
82 substitute edit-client $out/bin/edit-client \
83 --replace '9 9p' '${plan9port}/bin/9 9p' \
84 --replace 'kak -p' '${kakoune-unwrapped}/bin/kak -p'
85 chmod +x $out/bin/edit-client
89 description = "Kakoune integration with the Plan 9 plumber";
90 homepage = "https://github.com/eraserhd/kak-plumb";
91 license = licenses.unlicense;
92 maintainers = with maintainers; [ eraserhd philiptaron ];
93 platforms = platforms.all;
97 kakoune-rainbow = super.kakoune-rainbow.overrideAttrs(oldAttrs: rec {
100 mv $out/share/kak/autoload/plugins/kakoune-rainbow/bin/kak-rainbow.scm $out/bin
101 substituteInPlace $out/bin/kak-rainbow.scm \
102 --replace '/usr/bin/env -S guile' '${guile}/bin/guile'
103 substituteInPlace $out/share/kak/autoload/plugins/kakoune-rainbow/rainbow.kak \
104 --replace '%sh{dirname "$kak_source"}' "'$out'"
108 kakoune-state-save = buildKakounePluginFrom2Nix {
109 pname = "kakoune-state-save";
110 version = "2020-02-09";
112 src = fetchFromGitLab {
113 owner = "Screwtapello";
114 repo = "kakoune-state-save";
115 rev = "ab7c0c765326a4a80af78857469ee8c80814c52a";
116 sha256 = "AAOCG0TY3G188NnkkwMCSbkkNe487F4gwiFWwG9Yo+A=";
120 description = "Help Kakoune save and restore state between sessions";
121 homepage = "https://gitlab.com/Screwtapello/kakoune-state-save";
122 license = licenses.mit;
123 maintainers = with maintainers; [ Flakebi philiptaron ];
124 platforms = platforms.all;
128 powerline-kak = super.powerline-kak.overrideAttrs(oldAttrs: rec {
130 substituteInPlace $out/share/kak/autoload/plugins/powerline-kak/rc/modules/git.kak \
131 --replace ' git ' ' ${git}/bin/git '
135 hop-kak = rustPlatform.buildRustPackage rec {
140 url = "https://git.sr.ht/~hadronized/hop.kak";
141 rev = "7314ec64809a69e0044ba7ec57a18b43e3b5f005";
142 sha256 = "stmGZQU0tp+5xxrexKMzwSwHj5F/F4HzDO9BorNWC3w=";
144 # this package uses git to put the commit hash in the
145 # help dialog, so leave the .git folder so the command
150 nativeBuildInputs = [
154 cargoHash = "sha256-EjSj/+BysGwJBxK6Ccg2+pXHdB2Lg3dxIURRsSVTHVY=";
157 mkdir -p $out/share/kak/bin
158 mv $out/bin/hop-kak $out/share/kak/bin/
162 description = "hinting brought to Kakoune selections";
163 homepage = "https://git.sr.ht/~hadronized/hop.kak/";
164 license = licenses.bsd3;
165 maintainers = with maintainers; [ oleina ];
166 platforms = platforms.all;
170 quickscope-kak = buildKakounePluginFrom2Nix rec {
171 pname = "quickscope-kak";
175 url = "https://git.sr.ht/~voroskoi/quickscope.kak";
177 sha256 = "0y1g3zpa2ql8l9rl5i2w84bka8a09kig9nq9zdchaff5pw660mcx";
180 buildInputs = [ lua5_3 ];
183 mkdir -p $out/share/kak/autoload/plugins/
184 cp quickscope.* $out/share/kak/autoload/plugins/
185 # substituteInPlace does not like the pipe
186 sed -e 's,[|] *lua,|${lua5_3}/bin/lua,' quickscope.kak >$out/share/kak/autoload/plugins/quickscope.kak
190 description = "Highlight f and t jump positions";
191 homepage = "https://sr.ht/~voroskoi/quickscope.kak/";
192 license = licenses.unlicense;
193 maintainers = with maintainers; [ eraserhd ];
194 platforms = platforms.all;
198 kakoune-catppuccin = buildKakounePluginFrom2Nix {
199 pname = "kakoune-catppuccin";
200 version = "0-unstable-2024-03-29";
201 src = fetchFromGitHub {
202 owner = "catppuccin";
204 rev = "7f187d9da2867a7fda568b2135d29b9c00cfbb94";
205 hash = "sha256-acBOQuJ8MgsMKdvFV5B2CxuxvXIYsg11n1mHEGqd120=";
208 description = "Soothing pastel theme for Kakoune";
209 homepage = "https://github.com/catppuccin/kakoune/";
210 license = licenses.mit;
211 platforms = platforms.all;
212 maintainers = with maintainers; [ philipwilk ];