Commit Graph

1214 Commits

Author SHA1 Message Date
Philip Taron
1b0981b3cb buildEnv: explicitly set __structuredAttrs = false
builder.pl reads all configuration from %ENV, which is fundamentally
incompatible with __structuredAttrs = true (values go into a JSON file
instead). Explicitly opt out so buildEnv doesn't break when
structuredAttrsByDefault is enabled.

The override is placed in the final merge block so it cannot be
circumvented via derivationArgs.

Update the structuredAttrs test from asserting build failure to
verifying that the override works: the build succeeds even when
derivationArgs.__structuredAttrs = true, and eval tests confirm the
attribute is always false.

Suggested-by: Sietse Ringers <SFrijters>
2026-03-24 20:54:58 -07:00
nixpkgs-ci[bot]
ab405e7060 Merge staging-next into staging 2026-03-25 00:24:47 +00:00
Connor Baker
b6eb3c45b6 Marry meta.broken with meta.problems (#494416) 2026-03-24 20:29:27 +00:00
nixpkgs-ci[bot]
b5cc7da1e3 Merge staging-next into staging 2026-03-24 12:18:19 +00:00
Ryan Lahfa
0aa1bfb82a buildLakePackage, leanPackages: init (#497946) 2026-03-24 11:37:56 +00:00
Nadja Yang
9f1cb0f57c buildLakePackage: add weak-minimax test
Verifies that buildLakePackage works with nix-only deps (no
lake-manifest.json).  Builds a proof of the weak minimax inequality
from Mathlib.Order.CompleteLattice.Basic using leanDeps = [ mathlib ].
2026-03-21 17:53:43 -04:00
nixpkgs-ci[bot]
a342ef65ea Merge staging-next into staging 2026-03-20 12:12:07 +00:00
Florian Klink
b10e145984 Improve systemd creds support for radicle (#475836) 2026-03-20 09:45:53 +00:00
Elias Vasylenko
914bb2e6db nixos/radicle: Update radicle to support systemd creds more completely via ImportCredential
By default it will look for the cred names supported by the upstream package, but alternate cred names can be chosen to produce a rename on the ImportCredential.
2026-03-19 22:09:23 +00:00
Philip Taron
61eaaf6184 tests.buildenv: assert that structuredAttrs is broken
buildEnv's builder.pl reads all inputs from environment variables,
which is incompatible with structuredAttrs (values go into a JSON file
instead). Document this known failure as a test.
2026-03-19 13:43:18 -07:00
Philip Taron
42a88a9634 tests.buildenv: add build tests for output verification
Add derivations that actually build a buildEnv and verify the output tree.
Exposed as passthru.buildTests so they can be built individually or all at once.

- basic-symlinking: single package produces correct symlink structure
- pathsToLink: only specified subdirectories appear in output
- extraPrefix: output is rooted under the specified prefix
- postBuild: shell commands execute after the symlink tree
- ignoreCollisions: duplicate paths succeed when ignoreCollisions=true
2026-03-19 13:17:21 -07:00
Philip Taron
83669e31a2 tests.buildenv: test derivationArgs forwarding
Verify that:
- derivationArgs attributes reach the underlying mkDerivation (tested via allowSubstitutes overriding the default false)
- The backward-compat layer for top-level nativeBuildInputs still works (these are forwarded through compatArgs)
2026-03-19 13:17:21 -07:00
Philip Taron
dbf1fa96d8 tests.buildenv: test passthru merging
buildEnv merges passthru from three sources:
  `{ inherit paths; } // derivationArgs.passthru // passthru`

Verify that:
- Auto-injected paths are present in passthru
- derivationArgs.passthru attributes are preserved
- Direct passthru attributes are preserved
- Direct passthru takes precedence over derivationArgs.passthru
2026-03-19 13:17:21 -07:00
Philip Taron
fc93a90563 tests.buildenv: test overrideAttrs
Verify that overrideAttrs on a buildEnv result:

- Can modify passthru attributes
- Preserves the derivation name
- Produces a different derivation when a build-affecting attribute (postBuild) is changed
2026-03-19 13:17:20 -07:00
Philip Taron
effd58ab3e tests.buildenv: test finalAttrs self-reference
This is the core new capability of the PR: `buildEnv` now accepts a function `(finalAttrs: { ... })` enabling self-referencing attributes.

Verify that finalAttrs.name is accessible from within the argument function.
2026-03-19 13:17:20 -07:00
Philip Taron
150cd2ae32 tests.buildenv: test passthru.paths injection
buildEnv stashes `paths` into `passthru.paths` (rather than passing it directly as a derivation attribute) to prevent unexpected string context pollution. Verify that:
- paths are accessible via passthru.paths
- passthru.paths can be overridden with overrideAttrs
2026-03-19 13:17:20 -07:00
Philip Taron
cf7ebfa6ae tests.buildenv: test name/pname/version handling
Verify that:
- `name` argument is used directly as the derivation name
- `pname` + `version` composes into the derivation name
- Omitting all three triggers the buildEnv-specific assertion

The assertion test uses `builtins.tryEval` + `builtins.seq` to force evaluation of .drvPath and confirm it throws.
2026-03-19 13:17:18 -07:00
Philip Taron
d63fab02b0 tests.buildenv: init test harness
Add an eval-time test harness for buildEnv following the pattern established by `tests.overriding`.
Uses `lib.runTests` to compare expr/expected pairs, and the buildCommand reports pass/fail.

No tests yet; subsequent commits add them individually.
2026-03-19 13:17:18 -07:00
DavHau
514529545b tests.top-level: add test for appendOverlays preserving splicing
Ensures that appendOverlays with an empty list returns spliced
packages, so that cross-compilation in NixOS modules works correctly.
2026-03-19 22:05:47 +08:00
Dmitry Kalinkin
0699e4fcfe texlive: 2025.20260202 -> 2025-final (#495954) 2026-03-16 15:26:16 +00:00
Vincenzo Mantova
aa491a7e8d texlive: 2025.20260202 -> 2025-final 2026-03-16 07:24:18 +00:00
Silvan Mosberger
2e97caa6d3 stdenv: Use meta.problems for meta.broken underneath
And add tests for it
2026-03-13 19:36:57 +01:00
nixpkgs-ci[bot]
5be1f77a34 Merge master into staging-next 2026-03-11 06:17:28 +00:00
Silvan Mosberger
764a7dbadf stdenv: Fix handleEvalIssue for error problems
This was an oversight in https://github.com/NixOS/nixpkgs/pull/478539
that became apparent in https://github.com/NixOS/nixpkgs/pull/494416:

If there's a failing problem in Nixpkgs packages, CI will call
handleEvalIssue on it, but the problem error was missing a `.reason`.

Though even if it did have a reason, we need to do more to make sure
we don't break any code that uses it, so the new code uses the problem
kind as the reason, which happens to match with the reason for all
expected problem kinds.
2026-03-02 14:59:30 +01:00
nixpkgs-ci[bot]
5fad2685ca Merge staging-next into staging 2026-02-26 18:17:07 +00:00
Silvan Mosberger
27dd434480 stdenv.mkDerivation: Initial RFC 127 implementation
See https://github.com/NixOS/rfcs/blob/master/rfcs/0127-issues-warnings.md

Co-Authored-By: piegames <git@piegames.de>
Co-Authored-By: AkechiShiro <14914796+AkechiShiro@users.noreply.github.com>
2026-02-26 14:53:30 +01:00
nixpkgs-ci[bot]
ae7dc2807e Merge staging-next into staging 2026-02-21 00:23:34 +00:00
nixpkgs-ci[bot]
53793439fd Merge master into staging-next 2026-02-21 00:22:53 +00:00
Robert Scott
0f998b2204 tests.hardeningFlags: only inspect .text section in instructionPresenceTest (#492221) 2026-02-20 21:01:25 +00:00
nixpkgs-ci[bot]
6239383e7c Merge staging-next into staging 2026-02-20 18:14:02 +00:00
nixpkgs-ci[bot]
9af8e8ea80 Merge master into staging-next 2026-02-20 18:13:26 +00:00
Robert Scott
34a81df019 tests.hardeningFlags: only inspect .text section in instructionPresenceTest
other sections may include code that doesn't originate from
the compiler under test or may not obey flags in the same
way.

this should fix our pacret-detecting tests.
2026-02-19 19:29:41 +00:00
Emily
c3ea9587fa tests.cross: extend the existing config 2026-02-19 16:07:57 +00:00
Emily
36e1dea26b tests.stdenv: extend the existing config 2026-02-19 16:07:57 +00:00
Emily
368b0d3689 tests.config: extend the existing config 2026-02-19 16:07:31 +00:00
Michael Daniels
0388684a71 texlive: 2025.20250703 -> 2025.20260202 (#479358) 2026-02-15 15:14:09 +00:00
Robert Schütz
18fe5028e8 Merge branch 'master' into staging-next 2026-02-13 08:47:32 -08:00
Yueh-Shun Li
eddb12ac9d mkDerivation: make allowedReferences/allowedRequisites nullable when __structuredAttrs is true 2026-02-12 17:03:57 -08:00
Christoph Jabs
5851fddc7f texlive: 2025.20250703 -> 2025.20260202 2026-02-11 10:18:41 +02:00
Guillaume Maudoux
3eee223461 auto-patchelf: add --structured-logs feature, add test (#483740) 2026-02-02 11:14:51 +00:00
Florian Klink
c45f008187 auto-patchelf: add IgnoredDependency event
This logs when there was a missing dependency that was matched by an
ignore pattern.

The test case is extended to also check for having the IgnoredDependency
events in the structured log output.
2026-01-27 13:20:46 +02:00
Aleksi Hannula
3b2053bc5e tests.stdenv: fix remaining patch-shebangs tests 2026-01-26 21:45:18 +02:00
dish
44c0cd2165 tests.stdenv: fix preserves-binary-data test 2026-01-26 21:45:18 +02:00
Aleksi Hannula
5500570e9f stdenv: refactor to hook up minimal-bootstrap 2026-01-26 21:45:18 +02:00
Florian Klink
518d82c5be tests.auto-patchelf-structured-log: init
This adds a test for the --structured-log feature of auto-patchelf.

When auto-patchelf'ing ToneLib-Jam and only making freetype available,
we expect:

 - one "SetInterpreter" line
 - 3 "Dependency" lines (of which one found)
 - one SetRpath line (containing freetype)
2026-01-25 21:37:36 +02:00
nixpkgs-ci[bot]
23a2df36ea Merge master into staging-next 2026-01-18 18:05:48 +00:00
Wolfgang Walther
d5b81a3b69 tests: migrate some tests from all-packages (#435000) 2026-01-18 14:59:50 +00:00
Wolfgang Walther
2503778146 teams/mercury: handle team with external membership (#478845) 2026-01-18 14:17:32 +00:00
Wolfgang Walther
97fe4a07cb teams/mercury: drop 2026-01-18 15:12:20 +01:00
jopejoe1
9e568d613d tests.stdenv: migrate tests-stdenv-gcc-stageCompare from all-packages 2026-01-16 20:31:57 +01:00