mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
Move the user-guide to the new lib reference docs. Added a MDBook redirect entry. Updated man docs.
54 lines
1.2 KiB
Nix
54 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
options-json,
|
|
lib-docs,
|
|
runCommand,
|
|
installShellFiles,
|
|
nixos-render-docs,
|
|
pandoc,
|
|
}:
|
|
let
|
|
manHeader =
|
|
runCommand "nixvim-general-doc-manpage"
|
|
{
|
|
nativeBuildInputs = [ pandoc ];
|
|
}
|
|
''
|
|
function mkMDSection {
|
|
file="$1"
|
|
pandoc --lua-filter ${./filter.lua} -f gfm -t man "$file"
|
|
}
|
|
mkdir -p $out
|
|
|
|
(
|
|
cat ${./nixvim-header-start.5}
|
|
|
|
${lib.concatMapStringsSep "\n" (file: "mkMDSection ${file}") [
|
|
"${lib-docs}/lib/index.md"
|
|
../user-guide/faq.md
|
|
../user-guide/config-examples.md
|
|
]}
|
|
|
|
cat ${./nixvim-header-end.5}
|
|
) >$out/nixvim-header.5
|
|
'';
|
|
in
|
|
# FIXME add platform specific docs to manpage
|
|
runCommand "nixvim-configuration-reference-manpage"
|
|
{
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
nixos-render-docs
|
|
];
|
|
}
|
|
''
|
|
# Generate man-pages
|
|
mkdir -p $out/share/man/man5
|
|
nixos-render-docs -j $NIX_BUILD_CORES options manpage \
|
|
--revision unstable \
|
|
--header ${manHeader}/nixvim-header.5 \
|
|
--footer ${./nixvim-footer.5} \
|
|
${options-json}/share/doc/nixos/options.json \
|
|
$out/share/man/man5/nixvim.5
|
|
compressManPages $out
|
|
''
|