Commit graph

4,827 commits

Author SHA1 Message Date
Justin !
511bf56650
treewide: fix or-as-identifier
Lix will soon warn, and in the future, error when `or` is used as an
identifier. This commit fix those cases.
2025-12-31 17:02:13 -05:00
Michael Daniels
967cf1832f
Merge remote-tracking branch 'upstream/master' 2025-12-29 19:30:47 -05:00
Johannes Kirschbauer
7bed44f947
lib: move remaining builtins to appropriate places (#458280) 2025-12-29 20:59:21 +00:00
nixpkgs-ci[bot]
3557e60914
Merge master into staging-next 2025-12-28 06:06:11 +00:00
Lukas Wurzinger
436548e518
lib/cli: document toCommandLine 2025-12-27 15:26:38 +01:00
K900
b715e74ab2 Merge remote-tracking branch 'origin/master' into staging-next 2025-12-22 21:42:30 +03:00
Robert Hensing
34b2f6702f
lib.makeOverridable: preserve constructor override and metadata attributes (#461032) 2025-12-22 13:20:41 +00:00
K900
fe4f848a8b Merge remote-tracking branch 'origin/staging-next' into staging 2025-12-09 10:45:23 +03:00
Tom Hubrecht
ba6b3a4f6c
lib/tests: Use --option to enable abort-on-warn 2025-12-08 08:44:53 +01:00
nixpkgs-ci[bot]
f16fc9d4e7
Merge staging-next into staging 2025-12-06 00:17:35 +00:00
David McFarland
3dcf921c7b lib.systems: add isPE 2025-12-05 13:40:49 -04:00
nixpkgs-ci[bot]
242d57b5b6
Merge staging-next into staging 2025-12-02 12:08:04 +00:00
Johannes Kirschbauer
da7c27d546
docs/lib: fix markup errors and typos (#466380) 2025-12-02 11:36:53 +00:00
nixpkgs-ci[bot]
5fab9d29e3
Merge staging-next into staging 2025-12-01 18:07:01 +00:00
Robert Schütz
6252e8641c Merge branch 'staging-next' into staging 2025-11-29 16:29:41 -08:00
nixpkgs-ci[bot]
bfeabbb3bc
Merge master into staging-nixos 2025-11-30 00:21:09 +00:00
Anton Mosich
23808c75a8
docs/lib: Make links to clickable hyperlinks 2025-11-29 22:14:16 +01:00
Anton Mosich
0ba9a655f2
docs/lib: Fix smaller typos
The changes is lib/attrsets.nix make sure the names are consistent with
the names used in the respective description.
2025-11-29 22:04:24 +01:00
Anton Mosich
4fc8af31c0
docs/lib: use note/warning markup more consistently 2025-11-29 22:03:10 +01:00
Anton Mosich
0f8e9ceb21
docs/lib: use example markup consistently 2025-11-29 22:02:39 +01:00
Anton Mosich
850f3ce7d1
docs/lib/trivial: Use Type heading used in basically every other function documentation 2025-11-29 22:02:35 +01:00
Anton Mosich
31692961e7
docs/lib/strings: wrap command line arguments in quotes and backticks 2025-11-29 21:49:38 +01:00
Anton Mosich
367d102c09
docs/lib: use backticks for nix names 2025-11-29 21:46:54 +01:00
dotlambda
a09378c010
treewide: use lib.concatAttrValues to obtain all optional-dependencies (#465847) 2025-11-29 19:37:08 +00:00
Florian Klink
66eb6e7cc4
nixos/activation: avoid generating empty activation scripts (#464784) 2025-11-29 11:41:28 +00:00
nixpkgs-ci[bot]
1524bd6859
Merge staging-next into staging 2025-11-29 06:06:22 +00:00
Jacob Abel
c137fe9433
lib/strings.nix: Fix cmakeOptionType argument order in docs
Arguments were listed out of order in the documentation. Fixes that.

Signed-off-by: Jacob Abel <jacobabel@nullpo.dev>
2025-11-28 20:17:12 -05:00
nixpkgs-ci[bot]
c684deac9d
Merge staging-next into staging 2025-11-29 00:17:30 +00:00
Robert Schütz
fafebf715d lib.concatAttrValues: init
This is useful for adding all optional-dependencies to the
nativeCheckInputs of Python packages.
2025-11-27 21:44:14 -08:00
Robert Hensing
649a766e35 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
[ ]
2025-11-26 23:51:59 +01:00
Jo
f7764be128
{xorg-server,xvfb}: refactor, move to pkgs/by-name, and rename from xorg.xorgserver (#446052) 2025-11-26 15:01:54 +00:00
Robert Hensing
75c025c613
lib/types: make attrTag's description field list valid choices (#464627) 2025-11-25 18:28:32 +00:00
Johannes Kirschbauer
3ae8192162
lib: deprecate fold (#456532) 2025-11-25 14:15:41 +00:00
Aleksana
65e279c9db
libxinerama: resolve license todo (#464106) 2025-11-25 10:12:15 +00:00
jopejoe1
2493002b10 26.05 is Yarara 2025-11-24 21:17:44 +01:00
r-vdp
e16bd36ed6
nixos/activation: avoid generating empty activation scripts 2025-11-24 16:08:04 -03:00
cinereal
cf4da9fd69
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>
2025-11-24 18:45:48 +01:00
quantenzitrone
7e68960d7c
lib.licenses.x11NoPermitPersons: add 2025-11-23 14:44:20 +01:00
quantenzitrone
b7e706eb39
{xorg-server,xvfb}: refactor, move to pkgs/by-name, and rename from xorg.xorgserver
relevant changes:
- remove the hardingDisables
2025-11-15 22:03:07 +01:00
Yueh-Shun Li
21021adbe9 lib.makeOverrdable: preserve constructor override and metadata attributes 2025-11-13 18:01:44 +08:00
Vladimír Čunát
1d8d3da257
Merge branch 'master' into staging-next 2025-11-12 08:29:34 +01:00
jade
6c6c5e7703
lib.debug.throwTestFailures: init (#416207) 2025-11-11 21:53:20 +00:00
nixpkgs-ci[bot]
9fb545e56d
Merge master into staging-next 2025-11-11 10:05:22 +00:00
Robert Hensing
afa72f7c46
lib/modules: Add false positive info to check coherence assertion (#460112) 2025-11-11 08:29:29 +00:00
K900
81ed1c7278 Merge remote-tracking branch 'origin/master' into staging-next 2025-11-11 00:00:35 +03:00
Rebecca Turner
dc4cf16993 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"}]
```
2025-11-10 10:41:31 -08:00
quantenzitrone
4934c0596f
xkeyboard-config: improve license list
Previously I just set this to "free", however with
https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/issues/527
being resolved and https://github.com/spdx/license-list-XML/pull/2864
being merged this license is now a thing.
2025-11-09 20:22:54 +01:00
Robert Hensing
a01aeeb9b1 lib/modules: Add false positive info to check coherence assertion
Unfortunately, we don't have a good enough way to discern this
possibility. Technically we could add yet another attribute, but
that does not seem to be worth the cost at this point, in terms
of complexity and possibly even performance.

I take the blame for this one. I identified the need for the second
merge commit in review but didn't require it in the first merge.
These changes really should have been done in a single merge.
That would have prevented this situation.
2025-11-09 19:30:17 +01:00
nixpkgs-ci[bot]
6d1529ce8c
Merge master into staging-next 2025-11-07 00:17:59 +00:00
Jo
f255d72245
epeg: replace license with mit-enna (#458238) 2025-11-06 19:59:18 +00:00