| Commit message (Expand) | Author | Age | Files | Lines |
| * | lib/modules: add suggestions to invalid option name errors (#442263) | Silvan Mosberger | 2026-02-03 | 7 | -0/+192 |
| |\ |
|
| | * | lib/modules: Fix suggestions in submodules | Robert Hensing | 2025-10-28 | 3 | -0/+72 |
| | * | lib/modules: Support multiple suggestions, optimize | Robert Hensing | 2025-10-28 | 3 | -0/+80 |
| | * | lib/modules: add suggestions to invalid option name errors•••This change introduces the suggesting of possible valid option names for
a given invalid option, based on the keys of said invalid option's
parent attrset. That is, `foo.bar.baz` will only be suggested keys from
`foo.bar`, while `(config).baz` will only be suggested keys from the
toplevel.
| Winter | 2025-09-11 | 3 | -0/+40 |
| * | | treewide: apply nixfmt 1.2.0 | Dyego Aurélio | 2026-01-22 | 2 | -6/+6 |
| * | | lib.lists.replaceElemAt: init (#477775) | Johannes Kirschbauer | 2026-01-22 | 1 | -0/+13 |
| |\ \ |
|
| | * | | lib.lists.replaceElemAt: init•••It's very easy to resort to lib.take + lib.drop to accomplish this, but it's not obvious that it actually performs quite badly.
Replacing an item in a list should be a relative common operation.
| Glen Huang | 2026-01-12 | 1 | -0/+13 |
| * | | | lib/types: add tests for types.mkStructuredType | Johannes Kirschbauer | 2026-01-20 | 2 | -0/+45 |
| * | | | lib/tests: add strict option to checkConfigOutput | Johannes Kirschbauer | 2026-01-20 | 1 | -4/+11 |
| |/ / |
|
| * | | lib/strings.escapeNixIdentifier: quote keywords•••Previously `lib.strings.escapeNixIdentifier "assert"` would return `"assert"`; This is wrong, `assert` is not a valid identifier unless quoted.\
This also fixes `lib.generators.toPretty`: `toPretty {} { "assert" = false; }` would previously return an invalid expression.
| Shelvacu | 2026-01-02 | 1 | -1/+17 |
| * | | lib.makeOverridable: preserve constructor override and metadata attributes (#... | Robert Hensing | 2025-12-22 | 1 | -0/+79 |
| |\ \ |
|
| | * | | lib.makeOverrdable: preserve constructor override and metadata attributes | Yueh-Shun Li | 2025-11-13 | 1 | -0/+79 |
| * | | | lib/tests: Use --option to enable abort-on-warn | Tom Hubrecht | 2025-12-08 | 1 | -39/+43 |
| * | | | lib/tests: move throwTestFailures tests to standalone script•••The throwTestFailures tests in misc.nix produce confusing trace output
that looks like test failures even when tests pass.
This commit moves these tests to a new lib/tests/debug.sh script,
following the pattern from modules.sh, sources.sh, and filesystem.sh.
The confusing trace output does not appear in any logs anymore.
Example of the confusing log:
trace: FAIL "testDerivation":
Expected:
<derivation a>
Result:
<derivation b>
evaluation warning: Using `lib.generators.toPlist` without `escape = true` is deprecated
[ ]
| Robert Hensing | 2025-11-26 | 3 | -29/+85 |
| * | | | lib/types: make `attrTag`'s `description` field list valid choices (#464627) | Robert Hensing | 2025-11-25 | 1 | -6/+6 |
| |\ \ \ |
|
| | * | | | lib/types: make `attrTag`'s `description` field list valid choices•••Lists the valid choices in `attrTag` type's `description` field.
Given this description is used in error messages, this serves to make
for somewhat more descriptive errors in the event an option involving
this type turns out not to match.
Signed-off-by: cinereal <cinereal@riseup.net>
| cinereal | 2025-11-24 | 1 | -6/+6 |
| | |/ / |
|
| * | | | lib: deprecate fold (#456532) | Johannes Kirschbauer | 2025-11-25 | 1 | -9/+6 |
| |\ \ \
| |/ /
|/| | |
|
| | * | | lib: deprecate fold | Aliaksandr | 2025-10-30 | 1 | -9/+6 |
| * | | | lib.debug.throwTestFailures: init•••`lib.debug.runTests` provides a unit test evaluator for Nix, but its
results are returned in a raw and difficult-to-read form.
Currently, different callers output the results in various ways:
`builtins.throw (builtins.toJSON failures)` and `builtins.throw ("Tests
failed: " + lib.generators.toPretty { } failures)` are both used.
This change adds a new `lib.debug.throwTestFailures` function which
displays the results nicely before throwing an exception (or returns
`null` if no failures are given), unifying these disparate call-sites.
First, each failing test is pretty-printed in a `trace` message:
```
trace: FAIL testDerivation:
Expected: <derivation a>
Result: <derivation b>
```
Then, an exception is thrown containing the number of tests that failed
(and their names), followed by the raw JSON of the results (for parity
with previous usage, and because `lib.generators.toPretty` sometimes
omits information that `builins.toJSON` includes):
```
error:
… while evaluating the file '...':
… caused by explicit throw
at /nix/store/.../lib/debug.nix:528:7:
527| in
528| throw (
| ^
529| builtins.seq traceFailures (
error: 1 tests failed:
- testDerivation
[{"expected":"/nix/store/xh7kyqp69mxkwspmi81a94m9xx74r8dr-a","name":"testDerivation","result":"/nix/store/503l84nir4zw57d1shfhai25bxxn16c6-b"}]
```
| Rebecca Turner | 2025-11-10 | 1 | -2/+27 |
| * | | | lib/types: add externalPath | Felix Buehler | 2025-11-04 | 2 | -0/+17 |
| * | | | lib.types: introduce a `fileset` type (#428293) | Robert Hensing | 2025-11-04 | 3 | -0/+62 |
| |\ \ \ |
|
| | * | | | lib.types: add module tests for `fileset` | Niols | 2025-08-29 | 3 | -0/+62 |
| * | | | | lib: Add splicing utilities (#426889) | Robert Hensing | 2025-10-30 | 1 | -0/+78 |
| |\ \ \ \
| |_|/ /
|/| | | |
|
| | * | | | lib: Introduce Cross Index concept•••A Cross Index, short for Cross Platform Pair Index, is the essential
shape of a splice, without the invoking the more mind bending concept
of adding variations of for these 6 pairings to an existing thing so
that it can be switched out for something else.
So the purpose of a Cross Index is to contain the result of `f`\
(which may be reified in code, or just an abstract concept):
- f "build" "build"
- f "build" "host"
- ...
Splicing on the other hand refers not just to these six variants, but
to the idea of tacking them onto one of the variants. (hostTarget,
I believe)
Cross Indexes are a necessity for making cross compilation work, but
splicing is more than necessary.
| Robert Hensing | 2025-09-09 | 1 | -9/+9 |
| | * | | | lib: Add splice structure utilities | Robert Hensing | 2025-09-09 | 1 | -0/+78 |
| * | | | | lib/modules: Report error for unsupported `t // { check = ...; }` (#454964) | Robert Hensing | 2025-10-28 | 2 | -0/+136 |
| |\ \ \ \ |
|
| | * | | | | lib/modules: Report error for unsupported // { check }•••`check` can have a new place since the introduction of
merge.v2. This makes the // { check = ... } idiom unreliable.
In this PR we add checks to detect and report this.
merge.v2 introduced in:
https://github.com/NixOS/nixpkgs/pull/391544
Real world case:
https://hercules-ci.com/github/hercules-ci/hercules-ci-effects/jobs/875
| Robert Hensing | 2025-10-23 | 2 | -0/+136 |
| * | | | | | lib.teams: Add githubId from associated github teams•••This will allow the code for https://github.com/NixOS/nixpkgs/issues/447514
to make sure that the right team is requested for review,
even if it has been renamed in the meantime.
While the matching is currently based on the teams slug/name and not the
id, renames won't cause problems with `lib.teams`, because CI would
error if there's no match. Changing this can be future work.
| Silvan Mosberger | 2025-10-28 | 1 | -0/+4 |
| * | | | | | lib.teams: Add githubMaintainers field•••This is so you can figure out who to ask to get added to the team
Also avoid an unecessary `{ inherit lib; }` argument
| Silvan Mosberger | 2025-10-27 | 1 | -1/+5 |
| * | | | | | treewide: remove deprecated lib functions that had warning for more than 2 years | Aliaksandr | 2025-10-24 | 1 | -1/+1 |
| |/ / / / |
|
| * | | | | lib/cli: add toCommandLine | Lukas Wurzinger | 2025-10-21 | 1 | -0/+80 |
| * | | | | lib.teams: Remove .githubTeams in favor of singular .github•••No team was using the feature of having multiple GitHub teams, and this
would make it tricky to try to sync maintainer teams with GitHub teams.
| Silvan Mosberger | 2025-10-08 | 1 | -3/+3 |
| * | | | | treewide: remove redundant parentheses•••Auto-fixed by nixf-diagnose.
| Wolfgang Walther | 2025-10-05 | 5 | -20/+18 |
| * | | | | lib: init strings.join (#446278) | Robert Hensing | 2025-10-02 | 1 | -0/+10 |
| |\ \ \ \ |
|
| | * | | | | lib: init strings.join | Johannes Kirschbauer | 2025-09-27 | 1 | -0/+10 |
| * | | | | | lib: remove optional builtins prefixes from prelude functions (#447402) | Philip Taron | 2025-09-30 | 5 | -5/+5 |
| |\ \ \ \ \ |
|
| | * | | | | | lib: add builtins prefixes for prelude functions to improve clarity | NAHO | 2025-09-30 | 1 | -1/+1 |
| | * | | | | | lib: remove optional builtins prefixes from prelude functions•••Remove optional builtins prefixes from prelude functions by running:
builtins=(
abort
baseNameOf
break
derivation
derivationStrict
dirOf
false
fetchGit
fetchMercurial
fetchTarball
fetchTree
fromTOML
import
isNull
map
null
placeholder
removeAttrs
scopedImport
throw
toString
true
)
fd --type file . lib --exec-batch sed --in-place --regexp-extended "
s/\<builtins\.($(
printf '%s\n' "${builtins[@]}" |
paste --delimiter '|' --serial -
))\>/\1/g
"
nix fmt
| NAHO | 2025-09-30 | 5 | -6/+6 |
| | |/ / / / |
|
| * | | | | | cygwin: add as a cross-compilation target, and get hello to build (#444470) | John Ericson | 2025-09-30 | 1 | -2/+1 |
| |\ \ \ \ \
| |/ / / /
|/| | | | |
|
| | * | | | | cygwin: init as a target toolchain•••The old cygwin support used -pc-windows-cygnus as the config. This is
supported by LLVM, but not by GNU. This will change it to -pc-cygwin,
which is more generally supported.
Because the kernel is now 'cygwin' rather than 'windows', isWindows will
return false. There are lots of different reasons isWindows is used in
nixpkgs, but in my experience they often have to do with posix
compatibility and don't apply to cygwin.
Co-authored-by: Brian McKenna <brian@brianmckenna.org>
| David McFarland | 2025-09-27 | 1 | -2/+1 |
| * | | | | | lib/types: submodule fix description with freeformType (#443134) | Johannes Kirschbauer | 2025-09-25 | 2 | -0/+462 |
| |\ \ \ \ \
| |/ / / /
|/| | | | |
|
| | * | | | | lib/tests/modules: Test description composition | Robert Hensing | 2025-09-17 | 2 | -0/+462 |
| | |/ / / |
|
| * | | | | lib/types: minimal fix for the regression of either when used in freeformType... | Johannes Kirschbauer | 2025-09-14 | 5 | -0/+107 |
| |\ \ \ \ |
|
| | * | | | | lib/types.either: add tests for warning in legacy case | Johannes Kirschbauer | 2025-09-06 | 5 | -0/+107 |
| | | |/ /
| |/| | |
|
| * | | | | lib.options.optionAttrSetToDocList: add `visible = "transparent"` (#441782) | Robert Hensing | 2025-09-11 | 1 | -0/+105 |
| |\ \ \ \ |
|
| | * | | | | lib.options.optionAttrSetToDocList: add `visible = "transparent"`•••Allows marking an option as invisible, without excluding its sub-options.
In practice, this is similar to `visible = true; internal = true;`,
however it is more explicit and less reliant on implementation details.
| Matt Sturgeon | 2025-09-11 | 1 | -0/+16 |
| | * | | | | lib/tests/misc: add option visibility test | Matt Sturgeon | 2025-09-10 | 1 | -0/+89 |
| * | | | | | lib.mkEUI64Suffix: init (#416086) | misuzu | 2025-09-11 | 1 | -0/+44 |
| |\ \ \ \ \
| |/ / / /
|/| | | | |
|
| | * | | | | lib.mkEUI64Suffix: fix syntax errors and tests | nukdokplex | 2025-09-11 | 1 | -25/+25 |
| | * | | | | lib.mkEUI64Suffix: bring @hsjobeki suggestions•••renamed `mac` to `octets` in hextets combining step for better var
naming; rephrased error message to provide a hint of expected format;
replaced `Arguments` with `Inputs` in docstring; added more test cases
for invalid hex digits; added comments in hextets combining step;
| nukdokplex | 2025-09-10 | 1 | -19/+25 |