1 { symlinkJoin, makeWrapper, kakoune, plugins ? [], configure ? {} }:
4 # "plugins" is the preferred way, but some configurations may be
5 # using "configure.plugins", so accept both
6 requestedPlugins = plugins ++ (configure.plugins or []);
10 name = "kakoune-${kakoune.version}";
12 nativeBuildInputs = [ makeWrapper ];
14 paths = [ kakoune ] ++ requestedPlugins;
17 # location of kak binary is used to find ../share/kak/autoload,
18 # unless explicitly overriden with KAKOUNE_RUNTIME
20 makeWrapper "${kakoune}/bin/kak" "$out/bin/kak" --set KAKOUNE_RUNTIME "$out/share/kak"
22 # currently kakoune ignores doc files if they are symlinks, so workaround by
23 # copying doc files over, so they become regular files...
24 mkdir "$out/DELETE_ME"
25 mv "$out/share/kak/doc" "$out/DELETE_ME"
26 cp -r --dereference "$out/DELETE_ME/doc" "$out/share/kak"
27 rm -Rf "$out/DELETE_ME"
30 meta = kakoune.meta // { priority = (kakoune.meta.priority or 0) - 1; };