mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-19 22:30:23 +00:00
This simplifies the tooling and produces a structured data-asset that can be exposed for nixos-search and docs.nixos.org.
28 lines
537 B
Nix
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
|
|
'';
|
|
}
|