summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilvan Mosberger <silvan.mosberger@tweag.io>2023-11-20 03:02:11 +0100
committerSilvan Mosberger <silvan.mosberger@tweag.io>2023-11-20 03:02:11 +0100
commit055ba65fed8eac15b13ed68f70a7d506f9b2d291 (patch)
treec050f8a470371dec5c661f7666f8aaf10b696a72
parent3f21a22b5aafefa1845dec6f4a378a8f53d8681c (diff)
lib: Take advantage of section descriptions
See https://github.com/nix-community/nixdoc/releases/tag/v2.6.0
-rw-r--r--lib/attrsets.nix2
-rw-r--r--lib/filesystem.nix6
-rw-r--r--lib/gvariant.nix19
-rw-r--r--lib/lists.nix3
-rw-r--r--lib/options.nix2
-rw-r--r--lib/path/default.nix3
-rw-r--r--lib/sources.nix2
7 files changed, 20 insertions, 17 deletions
diff --git a/lib/attrsets.nix b/lib/attrsets.nix
index b0460ab139e8..bf6c90bf1be6 100644
--- a/lib/attrsets.nix
+++ b/lib/attrsets.nix
@@ -1,5 +1,5 @@
+/* Operations on attribute sets. */
{ lib }:
-# Operations on attribute sets.
let
inherit (builtins) head tail length;
diff --git a/lib/filesystem.nix b/lib/filesystem.nix
index f5bb8e9b5950..5569b8ac80fd 100644
--- a/lib/filesystem.nix
+++ b/lib/filesystem.nix
@@ -1,5 +1,7 @@
-# Functions for querying information about the filesystem
-# without copying any files to the Nix store.
+/*
+ Functions for querying information about the filesystem
+ without copying any files to the Nix store.
+*/
{ lib }:
# Tested in lib/tests/filesystem.sh
diff --git a/lib/gvariant.nix b/lib/gvariant.nix
index 3142ffc5f149..708213224d3e 100644
--- a/lib/gvariant.nix
+++ b/lib/gvariant.nix
@@ -1,16 +1,17 @@
+/*
+ A partial and basic implementation of GVariant formatted strings.
+ See [GVariant Format Strings](https://docs.gtk.org/glib/gvariant-format-strings.html) for details.
+
+ :::{.warning}
+ This API is not considered fully stable and it might therefore
+ change in backwards incompatible ways without prior notice.
+ :::
+*/
+
# This file is based on https://github.com/nix-community/home-manager
# Copyright (c) 2017-2022 Home Manager contributors
-#
-
-
{ lib }:
-/* A partial and basic implementation of GVariant formatted strings.
- See https://docs.gtk.org/glib/gvariant-format-strings.html for detauls.
-
- Note, this API is not considered fully stable and it might therefore
- change in backwards incompatible ways without prior notice.
-*/
let
inherit (lib)
concatMapStringsSep concatStrings escape head replaceStrings;
diff --git a/lib/lists.nix b/lib/lists.nix
index 15047f488f4d..a56667ec9c38 100644
--- a/lib/lists.nix
+++ b/lib/lists.nix
@@ -1,5 +1,4 @@
-# General list operations.
-
+/* General list operations. */
{ lib }:
let
inherit (lib.strings) toInt;
diff --git a/lib/options.nix b/lib/options.nix
index 7821924873dc..9c10dfc8b36a 100644
--- a/lib/options.nix
+++ b/lib/options.nix
@@ -1,4 +1,4 @@
-# Nixpkgs/NixOS option handling.
+/* Nixpkgs/NixOS option handling. */
{ lib }:
let
diff --git a/lib/path/default.nix b/lib/path/default.nix
index 1a55a2a7be8d..ab8a9e2202e9 100644
--- a/lib/path/default.nix
+++ b/lib/path/default.nix
@@ -1,4 +1,5 @@
-# Functions for working with paths, see ./path.md
+/* Functions for working with path values. */
+# See ./README.md for internal docs
{ lib }:
let
diff --git a/lib/sources.nix b/lib/sources.nix
index 8b7cd5c84f62..f61ea306aec5 100644
--- a/lib/sources.nix
+++ b/lib/sources.nix
@@ -1,4 +1,4 @@
-# Functions for copying sources to the Nix store.
+/* Functions for copying sources to the Nix store. */
{ lib }:
# Tested in lib/tests/sources.sh