Added manpages to the generated documentation
This commit is contained in:
parent
ba6377b375
commit
4472d74e96
5 changed files with 49 additions and 0 deletions
30
docs/man/default.nix
Normal file
30
docs/man/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ pkgs, self, ... }:
|
||||
{
|
||||
build = type: subcomponent: json:
|
||||
pkgs.runCommand "hylonix-${subcomponent}-manpage"
|
||||
{
|
||||
header = ./header.5;
|
||||
footer = ./footer.5;
|
||||
inherit type subcomponent json;
|
||||
revision = self.lastModifiedDate;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgs.buildPackages.installShellFiles
|
||||
pkgs.nixos-render-docs
|
||||
];
|
||||
allowedReferences = [ "out" ];
|
||||
}
|
||||
''
|
||||
substitute "$header" ./header \
|
||||
--subst-var subcomponent \
|
||||
--subst-var type
|
||||
|
||||
nixos-render-docs -j $NIX_BUILD_CORES options manpage \
|
||||
--revision "$revision" \
|
||||
--header ./header \
|
||||
--footer "$footer" \
|
||||
"$json/share/doc/nixos/options.json" \
|
||||
"hylonix-$subcomponent.5"
|
||||
installManPage hylonix-*.5
|
||||
'';
|
||||
}
|
||||
3
docs/man/footer.5
Normal file
3
docs/man/footer.5
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
.SH "AUTHORS"
|
||||
.PP
|
||||
hylodon
|
||||
11
docs/man/header.5
Normal file
11
docs/man/header.5
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
.TH "HYLONIX" "5" "01/01/1970" "hylonix"
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" enable line breaks after slashes
|
||||
.cflags 4 /
|
||||
.SH "NAME"
|
||||
\fIhylonix-@subcomponent@\fP \- @type@ from the hylonix flake
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
Loading…
Add table
Add a link
Reference in a new issue