2025-02-13 15:43:06 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
runCommand,
|
|
|
|
pandoc,
|
|
|
|
githubUrl ? "https://github.com/nix-community/nixvim/blob/main/",
|
|
|
|
docsUrl ? "https://nix-community.github.io/nixvim/",
|
|
|
|
}:
|
|
|
|
src:
|
|
|
|
runCommand (src.name or (builtins.baseNameOf src))
|
|
|
|
{
|
|
|
|
inherit src;
|
|
|
|
bindings =
|
|
|
|
lib.generators.toLua
|
|
|
|
{
|
|
|
|
asBindings = true;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
inherit githubUrl docsUrl;
|
|
|
|
};
|
|
|
|
filter = ./filter.lua;
|
|
|
|
nativeBuildInputs = [ pandoc ];
|
|
|
|
}
|
|
|
|
''
|
|
|
|
echo "$bindings" > filter.lua
|
|
|
|
cat $filter >> filter.lua
|
|
|
|
|
|
|
|
pandoc \
|
|
|
|
--output $out \
|
2025-02-24 14:35:45 +00:00
|
|
|
--from gfm \
|
|
|
|
--to gfm \
|
2025-02-13 15:43:06 +00:00
|
|
|
--lua-filter filter.lua \
|
|
|
|
$src
|
|
|
|
''
|