| Commit message (Expand) | Author | Age | Files | Lines |
| * | lib.getAttrFromPath: fix docs | Silvan Mosberger | 2025-04-22 | 1 | -2/+2 |
| * | treewide: Format all Nix files•••Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:
nix-build ci -A fmt.check
This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).
This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).
Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](https://github.com/NixOS/nixpkgs/tree/8616af08d915377bd930395f3b700a0e93d08728/maintainers/scripts/auto-rebase).
If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
| Silvan Mosberger | 2025-04-01 | 1 | -322/+265 |
| * | docs(lib): fix weird structures in attrsets docstrings | Daniel Flanagan | 2025-02-14 | 1 | -2/+2 |
| * | lib: improve filterAttrs (#345547) | Silvan Mosberger | 2024-11-01 | 1 | -3/+2 |
| |\ |
|
| | * | lib: refactor `filterAttrs`•••`filter` is a primop which is designed for this task, and it saves
the allocation of some singleton lists here.
| Robert Hensing | 2024-10-31 | 1 | -2/+2 |
| | * | lib: improve `filterAttrs`•••Co-authored-by: Silvan Mosberger <contact@infinisil.com>
| h7x4 | 2024-10-25 | 1 | -2/+1 |
| * | | treewide: lib.isInOldestRelease -> lib.oldestSupportedReleaseIsAtLeast | Robert Hensing | 2024-10-08 | 1 | -2/+2 |
| |/ |
|
| * | lib: add getStatic | Someone Serge | 2024-07-21 | 1 | -0/+29 |
| * | lib: reflect effective signatures of getOutput functions | Someone Serge | 2024-07-21 | 1 | -16/+18 |
| * | lib: add getOutput', a nix-lang counterpart of _overrideFirst | Someone Serge | 2024-07-21 | 1 | -1/+72 |
| * | lib.intersectAttrs: Export from builtins | Silvan Mosberger | 2024-06-20 | 1 | -1/+1 |
| * | lib/attrsets: introduce mapCartesianProduct | Gabriel Volpe | 2024-04-15 | 1 | -0/+34 |
| * | lib/attrsets: rename cartesianProductOfSets to cartesianProduct | Gabriel Volpe | 2024-04-15 | 1 | -5/+9 |
| * | lib.hasAttrByPath: fix typo (#302042) | Tharun Thennarasu | 2024-04-06 | 1 | -2/+2 |
| * | Apply suggestions from code review | Daniel Sidhion | 2024-03-19 | 1 | -0/+56 |
| * | doc: manual fixup after migration | Johannes Kirschbauer | 2024-03-19 | 1 | -71/+12 |
| * | doc: migrate lib.attrsets to use doc-comments | Johannes Kirschbauer | 2024-03-15 | 1 | -447/+1242 |
| * | Merge pull request #292941 from adisbladis/lib-getattrfrompath-env•••lib.getAttrFromPath: Don't use errorMessage variable | Silvan Mosberger | 2024-03-06 | 1 | -2/+1 |
| |\ |
|
| | * | lib.getAttrFromPath: Don't use errorMessage variable•••We can just pass the error message on without creating an environment.
| adisbladis | 2024-03-03 | 1 | -2/+1 |
| * | | Merge pull request #292938 from adisbladis/mapattrsrecursivecond-env•••lib.mapAttrsRecursiveCond: Eliminate intermediate one intermediate variable environment | Silvan Mosberger | 2024-03-06 | 1 | -7/+6 |
| |\ \ |
|
| | * | | lib.mapAttrsRecursiveCond: Eliminate intermediate one intermediate variable e... | adisbladis | 2024-03-03 | 1 | -7/+6 |
| | |/ |
|
| * | | Merge pull request #292937 from adisbladis/zipattrs-env•••lib.zipAttrs: Remove needless function wrapping | Silvan Mosberger | 2024-03-06 | 1 | -4/+1 |
| |\ \ |
|
| | * | | lib.zipAttrs: Remove needless function wrapping•••Returning the partially applied `zipAttrsWith fn` is the same as `sets: zipAttrsWith fn sets`.
| adisbladis | 2024-03-03 | 1 | -4/+1 |
| | |/ |
|
| * | | Merge pull request #292934 from adisbladis/lib-choosedevoutput•••lib.chooseDevOutputs: Remove needless function wrapping | Silvan Mosberger | 2024-03-06 | 1 | -4/+1 |
| |\ \ |
|
| | * | | lib.chooseDevOutputs: Remove needless function wrapping•••Returning the partially applied `map getDev` is the same as `drvs: map getDev drvs`.
| adisbladis | 2024-03-03 | 1 | -4/+1 |
| | |/ |
|
| * / | doc: add details on `mapAttrsRecursive[Cond]` (#293509)•••* doc: add details on `mapAttrsRecursive[Cond]`
from first reading it wasn't clear that `f` also takes the current
attribute path. also the value f receives is tricky due to how the
condition is evaluated.
Co-authored-by: Daniel Sidhion <DanielSidhion@users.noreply.github.com> | Valentin Gagarin | 2024-03-06 | 1 | -31/+46 |
| |/ |
|
| * | lib.attrsets: Remove unneeded polyfills•••Nix 2.3 (the minimum version needed to evaluate Nixpkgs) supports these, so no need to keep them around.
| Silvan Mosberger | 2024-02-09 | 1 | -9/+6 |
| * | lib: make deprecation warnings consistent•••The deprecation warnings in lib were wildly inconsistent. Different
formulations were used in different places for the same meaning. Some warnings
used builtins.trace instead of lib.warn, which prevents silencing; one even
only had a comment instead. Make everything more uniform.
| Alois Wohlschlager | 2024-02-03 | 1 | -4/+5 |
| * | lib/attrsets: Document and link Nix language operators | Robert Hensing | 2023-12-13 | 1 | -0/+24 |
| * | lib.attrsets.hasAttrByPath: Document law and laziness, and test it | Robert Hensing | 2023-12-08 | 1 | -0/+7 |
| * | lib.attrsets.longestValidPathPrefix: init•••Allows finding the most specific path that exists.
This is useful for error messages relating to attribute paths.
| Robert Hensing | 2023-12-08 | 1 | -0/+65 |
| * | Merge pull request #269552 from adisbladis/lib-matchattrs-list-allocs•••lib.attrsets.matchAttrs: Avoid some list allocations when walking structure | Robert Hensing | 2023-11-27 | 1 | -9/+20 |
| |\ |
|
| | * | lib.attrsets.matchAttrs: Avoid some list allocations when walking structure•••Benchmarks (`nix-instantiate ./. -A python3`):
- Before:
``` json
{
"cpuTime": 0.29049500823020935,
"envs": {
"bytes": 4484216,
"elements": 221443,
"number": 169542
},
"gc": {
"heapSize": 402915328,
"totalBytes": 53086800
},
"list": {
"bytes": 749424,
"concats": 4242,
"elements": 93678
},
"nrAvoided": 253991,
"nrFunctionCalls": 149848,
"nrLookups": 49612,
"nrOpUpdateValuesCopied": 1587837,
"nrOpUpdates": 10104,
"nrPrimOpCalls": 130356,
"nrThunks": 358981,
"sets": {
"bytes": 30423600,
"elements": 1859999,
"number": 41476
},
"sizes": {
"Attr": 16,
"Bindings": 16,
"Env": 16,
"Value": 24
},
"symbols": {
"bytes": 236145,
"number": 24453
},
"values": {
"bytes": 10502520,
"number": 437605
}
}
```
- After:
``` json
{
"cpuTime": 0.2946169972419739,
"envs": {
"bytes": 3315224,
"elements": 172735,
"number": 120834
},
"gc": {
"heapSize": 402915328,
"totalBytes": 48718432
},
"list": {
"bytes": 347568,
"concats": 4242,
"elements": 43446
},
"nrAvoided": 173252,
"nrFunctionCalls": 101140,
"nrLookups": 73595,
"nrOpUpdateValuesCopied": 1587837,
"nrOpUpdates": 10104,
"nrPrimOpCalls": 83067,
"nrThunks": 304216,
"sets": {
"bytes": 29704096,
"elements": 1831673,
"number": 24833
},
"sizes": {
"Attr": 16,
"Bindings": 16,
"Env": 16,
"Value": 24
},
"symbols": {
"bytes": 236145,
"number": 24453
},
"values": {
"bytes": 8961552,
"number": 373398
}
}
```
| adisbladis | 2023-11-27 | 1 | -9/+20 |
| * | | lib.attrsets.attrByPath: Don't allocate one extra list per lookup recursion•••Using `tail` in a recursive loop like this needlessly allocates.
This changes the loop to look up by list index instead.
| adisbladis | 2023-11-27 | 1 | -11/+21 |
| * | | lib.attrsets.hasAttrByPath: Don't allocate one extra list per lookup recursion•••Using `tail` in a recursive loop like this needlessly allocates.
This changes the loop to look up by list index instead.
| adisbladis | 2023-11-27 | 1 | -6/+10 |
| |/ |
|
| * | lib: Take advantage of section descriptions•••See https://github.com/nix-community/nixdoc/releases/tag/v2.6.0
| Silvan Mosberger | 2023-11-20 | 1 | -1/+1 |
| * | Merge pull request #254452 from flyingcircusio/lib-attrsToList•••lib.attrsets.attrsToList: add function | Silvan Mosberger | 2023-10-10 | 1 | -0/+30 |
| |\ |
|
| | * | lib.attrsets.attrsToList: add function•••For transforming back between lists and attrsets, it makes sense to have
a quasi-inverse of `builtins.listToAttrs` available as a library
function.
Co-authored-by: Silvan Mosberger <github@infinisil.com>
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
| Oliver Schmidt | 2023-10-10 | 1 | -0/+30 |
| * | | lib.attrsets.foldlAttrs: Make stricter•••See the parent commit for the same change to lib.lists.foldl'
| Silvan Mosberger | 2023-09-27 | 1 | -5/+5 |
| * | | lib.lists.foldl': Make strict in the initial accumulator•••To maintain backwards compatibility, this can't be changed in the Nix language.
We can however ensure that the version Nixpkgs has the more intuitive behavior.
| Silvan Mosberger | 2023-09-27 | 1 | -1/+1 |
| |/ |
|
| * | lib.attrsets.mergeAttrsList: init•••Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
| Silvan Mosberger | 2023-07-18 | 1 | -0/+36 |
| * | lib/attrsets: remove unused let bindings | figsoda | 2023-06-23 | 1 | -1/+1 |
| * | lib.concatMapAttrs: Simplify stack trace | Robert Hensing | 2023-05-31 | 1 | -1/+5 |
| * | lib: add missing removeAttrs builtin•••I'm expecting all the builtins.* functions to be available in lib.*
| zimbatm | 2023-04-19 | 1 | -1/+1 |
| * | init: lib.foldlAttrs•••- provide comprehensive example
- add unit test
| hsjobeki | 2023-03-11 | 1 | -0/+60 |
| * | lib: standardise attrset type syntax•••There are a number of different syntaxes used for attrset type
signatures in our doc strings, this change standardises upon one that
uses :: for specifying attribute type, and ; terminators to be
consistent with nix syntax. There are no bugs in the functions
themselves, just that different syntaxes may confuse new users.
| Colin Arnott | 2023-01-30 | 1 | -5/+5 |
| * | Update lib/attrsets.nix•••Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> | Adam Joseph | 2023-01-25 | 1 | -1/+4 |
| * | attrsets: clarify that mapAttrs maps over *leaf* attrs | Adam Joseph | 2023-01-22 | 1 | -2/+4 |
| * | lib: Fix mismatched quotes in `lib.*` doc comments•••caused problems for automated rich text generation such as
https://teu5us.github.io/nix-lib.html#customisation-functions
| YoshiRulz | 2023-01-02 | 1 | -10/+10 |
| * | attrsets: fix and add some doc types | hsjobeki | 2022-12-24 | 1 | -25/+36 |