summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorNaïm Favier <n@monade.li>2022-12-12 13:17:47 +0100
committerNaïm Favier <n@monade.li>2022-12-22 11:31:11 +0100
commit5782c3d802d9c8dc8bfb2901d3dba6cc7d47056f (patch)
treee946c18f09489e6fede93f0950e0d62ac3a0e52a /doc
parentce952286ca8a37e8c63d9627aec2f0dc2c2913f2 (diff)
downloadnixpkgs-5782c3d802d9c8dc8bfb2901d3dba6cc7d47056f.tar
nixpkgs-5782c3d802d9c8dc8bfb2901d3dba6cc7d47056f.tar.gz
nixpkgs-5782c3d802d9c8dc8bfb2901d3dba6cc7d47056f.tar.bz2
nixpkgs-5782c3d802d9c8dc8bfb2901d3dba6cc7d47056f.tar.lz
nixpkgs-5782c3d802d9c8dc8bfb2901d3dba6cc7d47056f.tar.xz
nixpkgs-5782c3d802d9c8dc8bfb2901d3dba6cc7d47056f.tar.zst
nixpkgs-5782c3d802d9c8dc8bfb2901d3dba6cc7d47056f.zip
doc/lib-functions: print libset name before description
Diffstat (limited to 'doc')
-rw-r--r--doc/doc-support/default.nix20
-rw-r--r--doc/doc-support/lib-function-docs.nix3
2 files changed, 12 insertions, 11 deletions
diff --git a/doc/doc-support/default.nix b/doc/doc-support/default.nix
index c55df4ce870..ec180064c35 100644
--- a/doc/doc-support/default.nix
+++ b/doc/doc-support/default.nix
@@ -4,17 +4,17 @@ let
   inherit (lib) hasPrefix removePrefix;
 
   libsets = [
-    { name = "asserts"; description = "Assert 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 = "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 = "filesystem"; description = "Filesystem functions"; }
-    { name = "sources"; description = "Source filtering functions"; }
-    { name = "cli"; description = "Command-line serialization functions"; }
+    { name = "filesystem"; description = "filesystem functions"; }
+    { name = "sources"; description = "source filtering functions"; }
+    { name = "cli"; description = "command-line serialization functions"; }
   ];
 
   locationsXml = import ./lib-function-locations.nix { inherit pkgs nixpkgs libsets; };
diff --git a/doc/doc-support/lib-function-docs.nix b/doc/doc-support/lib-function-docs.nix
index d3d90d98c98..d6fa08aa962 100644
--- a/doc/doc-support/lib-function-docs.nix
+++ b/doc/doc-support/lib-function-docs.nix
@@ -9,7 +9,8 @@ with pkgs; stdenv.mkDerivation {
   buildInputs = [ nixdoc ];
   installPhase = ''
     function docgen {
-      nixdoc -c "$1" -d "$2" -f "$1.nix" > "$out/$1.xml"
+      # TODO: wrap lib.$1 in <literal>, make nixdoc not escape it
+      nixdoc -c "$1" -d "lib.$1: $2" -f "$1.nix" > "$out/$1.xml"
       echo "<xi:include href='$1.xml' />" >> "$out/index.xml"
     }