From 78f21b75b7b4b8dfdfc0bc44b98d22d8becdbf2b Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 9 Dec 2023 22:21:36 +0300 Subject: [PATCH] docs: include manpages --- docs/default.nix | 18 +++++++++--------- docs/footer.5 | 3 +++ docs/header.5 | 14 ++++++++++++++ docs/neovim-flake.1 | 29 +++++++++++++++++++++++++++++ 4 files changed, 55 insertions(+), 9 deletions(-) create mode 100644 docs/footer.5 create mode 100644 docs/header.5 create mode 100644 docs/neovim-flake.1 diff --git a/docs/default.nix b/docs/default.nix index 695ce1e..5c07eda 100644 --- a/docs/default.nix +++ b/docs/default.nix @@ -39,7 +39,7 @@ name = "<${repo}/${subpath}>"; }; - hmPath = toString ./..; + nvimPath = toString ./..; buildOptionsDocs = args @ { modules, @@ -59,10 +59,10 @@ # Clean up declaration sites to not refer to the Home Manager # source tree. declarations = map (decl: - if lib.hasPrefix hmPath (toString decl) + if lib.hasPrefix nvimPath (toString decl) then githubDeclaration "notashelf" "neovim-flake" - (lib.removePrefix "/" (lib.removePrefix hmPath (toString decl))) + (lib.removePrefix "/" (lib.removePrefix nvimPath (toString decl))) else if decl == "lib/modules.nix" then # TODO: handle this in a better way (may require upstream @@ -97,11 +97,11 @@ mkdir -p $out/share/man/man1 nixos-render-docs -j $NIX_BUILD_CORES options manpage \ --revision ${revision} \ - --header ${./home-configuration-nix-header.5} \ - --footer ${./home-configuration-nix-footer.5} \ + --header ${./header.5} \ + --footer ${./footer.5} \ ${nvimModuleDocs.optionsJSON}/share/doc/nixos/options.json \ - $out/share/man/man5/home-configuration.nix.5 - cp ${./home-manager.1} $out/share/man/man1/home-manager.1 + $out/share/man/man5/neovim-flake.5 + cp ${./neovim-flake.1} $out/share/man/man1/neovim-flake.1 ''; # Generate the HTML manual pages neovim-flake-manual = pkgs.callPackage ./manual.nix { @@ -125,13 +125,13 @@ in { meta.description = "List of Home Manager options in JSON format"; } '' mkdir -p $out/{share/doc,nix-support} - cp -a ${nvimModuleDocs.optionsJSON}/share/doc/nixos $out/share/doc/home-manager + cp -a ${nvimModuleDocs.optionsJSON}/share/doc/nixos $out/share/doc/neovim-flake substitute \ ${nvimModuleDocs.optionsJSON}/nix-support/hydra-build-products \ $out/nix-support/hydra-build-products \ --replace \ '${nvimModuleDocs.optionsJSON}/share/doc/nixos' \ - "$out/share/doc/home-manager" + "$out/share/doc/neovim-flake" ''; }; diff --git a/docs/footer.5 b/docs/footer.5 new file mode 100644 index 0000000..f2c7cfd --- /dev/null +++ b/docs/footer.5 @@ -0,0 +1,3 @@ +.SH "AUTHORS" +.PP +neovim-flake contributors diff --git a/docs/header.5 b/docs/header.5 new file mode 100644 index 0000000..e3307ed --- /dev/null +++ b/docs/header.5 @@ -0,0 +1,14 @@ +.TH "neovim-flake" "5" "01/01/1980" "neovim-flake" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" enable line breaks after slashes +.cflags 4 / +.SH "NAME" +neovim-flake configuration specification +.SH "OPTIONS" +.PP +You can use the following options in +home\-configuration\&.nix: +.PP diff --git a/docs/neovim-flake.1 b/docs/neovim-flake.1 new file mode 100644 index 0000000..54aab90 --- /dev/null +++ b/docs/neovim-flake.1 @@ -0,0 +1,29 @@ +.Dd January 1, 1980 +.Dt neovim-flake 1 +.Os neovim-flake +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" enable line breaks after slashes +.cflags 4 / +.Sh NAME +.Nm neovim-flake +.Nd a extensible and distro-agonistic Neovim configuration wrapper in Nix +. +.Sh BUGS +.Pp +Please report any bugs on the +\m[blue]\fBproject issue tracker\fR\m[]\&. + +.Sh AUTHOR +.Pp +\fBneovim-flake contributors\fR +.RS 4 +Author. +.RE + +.Sh COPYRIGHT +.br +Copyright \(co 2017\(en2022 neovim-flake contributors +.br