hylonix/docs/man/default.nix

32 lines
840 B
Nix
Raw Normal View History

{ pkgs, self, ... }:
{
2026-03-01 19:33:49 +00:00
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
'';
}