Commit Graph

4785 Commits

Author SHA1 Message Date
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
Sandro Jäckel
4a540db6aa licenses: add mit-enna 2025-11-06 20:46:40 +01:00
nixpkgs-ci[bot]
b24205e0ee Merge master into staging-next 2025-11-06 18:06:03 +00:00
Philip Taron
9a678d7f4e lib.extendMkDerivation: add argument excludeFunctionArgNames and improve argument documentation (#459124) 2025-11-06 16:16:57 +00:00
Yueh-Shun Li
3026703280 lib.extendMkDerivation: add argument excludeFunctionArgNames 2025-11-06 23:42:14 +08:00
Yueh-Shun Li
d75b203514 lib.extendMkDerivation: document the typical usage of inheritFunctionArgs 2025-11-06 23:37:18 +08:00
Yueh-Shun Li
7f6ce9097f lib.extendMkDerivation: fix argument documentation layout 2025-11-06 23:35:08 +08:00
Yueh-Shun Li
918e017d64 lib.extendMkDerivation: adjust default value documentation 2025-11-06 19:34:30 +08:00
Felix Buehler
3106949fd7 lib/types: add externalPath 2025-11-04 22:57:16 +01:00
nixpkgs-ci[bot]
b07ca7b994 Merge master into staging-next 2025-11-04 19:27:06 +00:00
Robert Hensing
49f0cbd7f8 lib.types: introduce a fileset type (#428293) 2025-11-04 13:44:33 +00:00
nixpkgs-ci[bot]
d6fd3bcd5a Merge master into staging-next 2025-11-04 00:17:07 +00:00
Sandro Jäckel
8ea573926b licenses: add gnuplot 2025-11-03 22:52:43 +01:00
K900
934d11cb78 Merge remote-tracking branch 'origin/staging-next' into staging 2025-11-02 00:50:30 +03:00
Philip Taron
21623b7ce7 Reapply "splice.nix: make pkgs splicedPackages" (#456138) 2025-11-01 13:49:33 +00:00
nixpkgs-ci[bot]
9c7c6cc7ff Merge staging-next into staging 2025-10-31 00:17:58 +00:00
Robert Hensing
acb6191c6e lib: Add splicing utilities (#426889) 2025-10-30 21:22:54 +00:00
Wolfgang Walther
4949737a38 systems/examples: remove x86_64-unknown-redox
relibc itself has been removed in 2024 already.
2025-10-28 21:54:04 +01:00
nixpkgs-ci[bot]
c522ea5070 Merge staging-next into staging 2025-10-28 18:06:54 +00:00
Robert Hensing
586961172a lib/modules: Report error for unsupported t // { check = ...; } (#454964) 2025-10-28 16:40:39 +00:00
nixpkgs-ci[bot]
6a088f5b69 Merge staging-next into staging 2025-10-28 00:17:14 +00:00
Silvan Mosberger
7636389851 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.
2025-10-28 00:01:51 +01:00
Silvan Mosberger
ddf8b5da4a 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
2025-10-27 19:36:58 +01:00
Silvan Mosberger
428bd8f1a2 lib.teams: Populate fields from synced GitHub state
The before and after of

    nix-instantiate --eval -A lib.teams --strict --json | jq 'walk(if type == "array" then sort else . end)'

has been ensured to be negligible, only consisting of minor team
shortName and scope differences
2025-10-27 19:36:57 +01:00
nixpkgs-ci[bot]
9c3c785b9e Merge staging-next into staging 2025-10-26 00:19:00 +00:00
Johannes Kirschbauer
8c222f2fc7 treewide: remove deprecated lib functions that had warning for more than 2 years (#454377) 2025-10-25 20:35:54 +00:00
nixpkgs-ci[bot]
584512ec5c Merge staging-next into staging 2025-10-25 12:06:42 +00:00
Alyssa Ross
d563aa57de lib.systems.parse: Default glibc ppc64 to ELFv1 ABI (#451088) 2025-10-25 09:57:43 +00:00
Alyssa Ross
9711c5ae0d lib.systems: Simplify ABI on POWER for rust.rustcTarget (#451087) 2025-10-25 09:57:09 +00:00
Wolfgang Walther
4dd2f20130 Merge staging-next into staging 2025-10-24 09:27:24 +02:00
Aliaksandr
dc7095a86e treewide: remove deprecated lib functions that had warning for more than 2 years 2025-10-24 06:30:16 +03:00
Robert Hensing
93ea59f66d 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
2025-10-23 19:06:05 +02:00
Wolfgang Walther
3e505de718 freeimage: drop
Very insecure.
2025-10-23 13:54:39 +02:00
K900
5cb3e47242 Merge remote-tracking branch 'origin/staging-next' into staging 2025-10-22 21:22:37 +03:00
Johannes Kirschbauer
43b77e1457 lib/cli: add toCommandLine (#404233) 2025-10-22 14:45:00 +00:00
Vladimír Čunát
d560d72dd2 Merge branch 'master' into staging 2025-10-22 08:47:06 +02:00
Philip Taron
62d9b8a326 lib.customisation: fix error message when running in nix repl (#452573) 2025-10-22 02:06:47 +00:00
nixpkgs-ci[bot]
c17f995873 Merge staging-next into staging 2025-10-22 00:17:44 +00:00
Silvan Mosberger
a8ae0941a3 lib/types: small typo fix (#454354) 2025-10-21 22:31:12 +00:00
Aliaksandr
bb56489b2f lib/types: small typo fix 2025-10-22 00:20:17 +03:00
Lukas Wurzinger
1f4c50ab81 lib/cli: deprecate toGNUCommandLine 2025-10-21 21:01:38 +02:00