summaryrefslogtreecommitdiff
path: root/lib/fileset/internal.nix
diff options
context:
space:
mode:
authorJohannes Kirschbauer <hsjobeki@gmail.com>2025-02-12 14:38:20 +0700
committerJohannes Kirschbauer <hsjobeki@gmail.com>2025-02-12 15:01:43 +0700
commit88f912da4852c38a5db25e882f3d89dac23a421c (patch)
treee26171ca73e266a4cc1cbf030fb522f3bcc6af67 /lib/fileset/internal.nix
parentmoonfire-nvr: 0.7.17 -> 0.7.20 (#377672) (diff)
downloadnixpkgs-88f912da4852c38a5db25e882f3d89dac23a421c.tar.gz
Docs: migrate format of comments to doc-comments
Diffstat (limited to 'lib/fileset/internal.nix')
-rw-r--r--lib/fileset/internal.nix38
1 files changed, 34 insertions, 4 deletions
diff --git a/lib/fileset/internal.nix b/lib/fileset/internal.nix
index 7f002216bc7f..1fd0a7e2350d 100644
--- a/lib/fileset/internal.nix
+++ b/lib/fileset/internal.nix
@@ -267,7 +267,7 @@ rec {
# Set all entries not present to null
mapAttrs (name: value: null) (readDir path) // value;
- /*
+ /**
A normalisation of a filesetTree suitable filtering with `builtins.path`:
- Replace all directories that have no files with `null`.
This removes directories that would be empty
@@ -276,7 +276,22 @@ rec {
Note that this function is strict, it evaluates the entire tree
- Type: Path -> filesetTree -> filesetTree
+
+ # Inputs
+
+ `path`
+
+ : 1\. Function argument
+
+ `tree`
+
+ : 2\. Function argument
+
+ # Type
+
+ ```
+ Path -> filesetTree -> filesetTree
+ ```
*/
_normaliseTreeFilter =
path: tree:
@@ -298,7 +313,7 @@ rec {
else
tree;
- /*
+ /**
A minimal normalisation of a filesetTree, intended for pretty-printing:
- If all children of a path are recursively included or empty directories, the path itself is also recursively included
- If all children of a path are fully excluded or empty directories, the path itself is an empty directory
@@ -307,7 +322,22 @@ rec {
Note that this function is partially lazy.
- Type: Path -> filesetTree -> filesetTree (with "emptyDir"'s)
+
+ # Inputs
+
+ `path`
+
+ : 1\. Function argument
+
+ `tree`
+
+ : 2\. Function argument
+
+ # Type
+
+ ```
+ Path -> filesetTree -> filesetTree (with "emptyDir"'s)
+ ```
*/
_normaliseTreeMinimal =
path: tree: