Files
nixpkgs/doc/doc-support/lib-function-docs.nix
Johannes Kirschbauer a694fdc604 doc/functions: use manifest mode from nixdoc
This simplifies the tooling and produces a structured data-asset that can
be exposed for nixos-search and docs.nixos.org.
2026-09-16 12:28:00 +02:00

28 lines
537 B
Nix

# Generates the documentation for library functions via nixdoc.
# To build this derivation, run `nix-build -A nixpkgs-manual.lib-docs`
{
stdenvNoCC,
nixdoc,
}:
stdenvNoCC.mkDerivation {
name = "nixpkgs-lib-docs";
src = ../../lib;
nativeBuildInputs = [ nixdoc ];
buildPhase = ''
mkdir -p src
cp -r ${../../lib} src/lib
mkdir -p $out
nixdoc --manifest ${../function-catalog.json} --root src --output $out/lib-functions.json
'';
installPhase = ''
runHook preInstall
runHook postInstall
'';
}