diff --git a/doc/default.nix b/doc/default.nix index 2133a06e0f46..5954e4495adb 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}' diff --git a/doc/doc-support/default.nix b/doc/doc-support/default.nix deleted file mode 100644 index 082b585fc937..000000000000 --- a/doc/doc-support/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ pkgs ? (import ../.. {}), nixpkgs ? { }}: -let - 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"; } - ]; - - functionDocs = import ./lib-function-docs.nix { inherit pkgs nixpkgs libsets; }; - -in pkgs.runCommand "doc-support" {} -'' - mkdir result - ( - cd result - ln -s ${functionDocs} ./function-docs - ) - mv result $out -''