nix-home/packages/common/nki-kakoune/kaktex/default.nix

23 lines
530 B
Nix
Raw Normal View History

2024-09-28 14:34:57 +00:00
{ fish, lib, writeScript, writeTextDir, kakouneUtils, ... }:
let
kaktex-script = writeScript "kaktex" ''
#!/usr/bin/env ${lib.getExe fish}
${builtins.readFile ./kaktex.fish}
'';
kaktex = writeTextDir "kaktex.kak" ''
hook global WinSetOption filetype=(tex|latex) %{
hook window WinDisplay '.*' %{
eval %sh{
${kaktex-script} set $kak_client $kak_session
}
}
}
'';
in
kakouneUtils.buildKakounePluginFrom2Nix {
pname = "kaktex";
version = "latest";
src = kaktex;
}