diff options
author | Daniel Sidhion <DanielSidhion@users.noreply.github.com> | 2024-03-19 17:56:06 -0700 |
---|---|---|
committer | DS <commits@sidhion.com> | 2024-03-19 18:03:31 -0700 |
commit | d784fc138dd3441e13bcf81a8ed710643ea80040 (patch) | |
tree | 7f6db7c2baf18cc246f9bb6a4531b6471994bf89 /lib | |
parent | 56b5634a90d60f0e2faaf9f7fdad8fd114415937 (diff) |
Apply suggestions from code review
Diffstat (limited to 'lib')
-rw-r--r-- | lib/attrsets.nix | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/lib/attrsets.nix b/lib/attrsets.nix index ab5900eed34ea..de5968b953485 100644 --- a/lib/attrsets.nix +++ b/lib/attrsets.nix @@ -579,6 +579,16 @@ rec { Collect each attribute named `attr` from a list of attribute sets. Sets that don't contain the named attribute are ignored. + # Inputs + + `attr` + + : The attribute name to get out of the sets. + + `list` + + : The list of attribute sets to go through + # Type ``` @@ -943,6 +953,16 @@ rec { /** Apply a function to each element in an attribute set, creating a new attribute set. + # Inputs + + `f` + + : A function that takes an attribute name and its value, and returns the new value for the attribute. + + `attrset` + + : The attribute set to iterate through. + # Type ``` @@ -1061,6 +1081,12 @@ rec { This is because the `listToAttrs` removes duplicate names and doesn't preserve the order of the list. ::: + # Inputs + + `set` + + : The attribute set to deconstruct. + # Type ``` @@ -1742,6 +1768,12 @@ rec { Get a package's `bin` output. If the output does not exist, fallback to `.out` and then to the default. + # Inputs + + `pkg` + + : The package whose `bin` output will be retrieved. + # Type ``` @@ -1766,6 +1798,12 @@ rec { Get a package's `lib` output. If the output does not exist, fallback to `.out` and then to the default. + # Inputs + + `pkg` + + : The package whose `lib` output will be retrieved. + # Type ``` @@ -1790,6 +1828,12 @@ rec { Get a package's `dev` output. If the output does not exist, fallback to `.out` and then to the default. + # Inputs + + `pkg` + + : The package whose `dev` output will be retrieved. + # Type ``` @@ -1814,6 +1858,12 @@ rec { Get a package's `man` output. If the output does not exist, fallback to `.out` and then to the default. + # Inputs + + `pkg` + + : The package whose `man` output will be retrieved. + # Type ``` @@ -1836,6 +1886,12 @@ rec { /** Pick the outputs of packages to place in `buildInputs` + # Inputs + + `pkgs` + + : List of packages. + # Type ``` |