diff options
author | pennae <github@quasiparticle.net> | 2023-06-23 02:02:57 +0200 |
---|---|---|
committer | pennae <github@quasiparticle.net> | 2023-07-01 20:59:30 +0200 |
commit | fc1b58b593bf8257a7757e69b9a70c2ca3337e20 (patch) | |
tree | 4832f8f319643d489b9713f06e80a5fe1fe80b03 /doc/default.nix | |
parent | 70cbd8c6c07378c7bf8b6d224d904c33a430914f (diff) |
doc: inline doc-support to main drv
separating function docs out like this makes it less clear how library documentation is generated and integrated into the build. if in the future more parts of nixpkgs use nixdoc it will make sense to have all information about library doc generation in the same place.
Diffstat (limited to 'doc/default.nix')
-rw-r--r-- | doc/default.nix | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/doc/default.nix b/doc/default.nix index 2133a06e0f467..5954e4495adb9 100644 --- a/doc/default.nix +++ b/doc/default.nix @@ -3,7 +3,23 @@ let inherit (pkgs) lib; inherit (lib) hasPrefix removePrefix; - doc-support = import ./doc-support { inherit pkgs nixpkgs; }; + lib-docs = import ./doc-support/lib-function-docs.nix { + inherit pkgs nixpkgs; + libsets = [ + { name = "asserts"; description = "assertion functions"; } + { name = "attrsets"; description = "attribute set functions"; } + { name = "strings"; description = "string manipulation functions"; } + { name = "versions"; description = "version string functions"; } + { name = "trivial"; description = "miscellaneous functions"; } + { name = "lists"; description = "list manipulation functions"; } + { name = "debug"; description = "debugging functions"; } + { name = "options"; description = "NixOS / nixpkgs option handling"; } + { name = "path"; description = "path functions"; } + { name = "filesystem"; description = "filesystem functions"; } + { name = "sources"; description = "source filtering functions"; } + { name = "cli"; description = "command-line serialization functions"; } + ]; + }; epub = pkgs.runCommand "manual.epub" { nativeBuildInputs = with pkgs; [ libxslt zip ]; @@ -78,14 +94,13 @@ in pkgs.stdenv.mkDerivation { src = ./.; postPatch = '' - ln -s ${doc-support} ./doc-support/result ln -s ${optionsDoc.optionsJSON}/share/doc/nixos/options.json ./config-options.json ''; buildPhase = '' cat \ ./functions/library.md.in \ - ./doc-support/result/function-docs/index.md \ + ${lib-docs}/index.md \ > ./functions/library.md substitute ./manual.md.in ./manual.md \ --replace '@MANUAL_VERSION@' '${pkgs.lib.version}' |