Commit Graph

3504 Commits

Author SHA1 Message Date
nixpkgs-ci[bot]
cd4453b4ea Merge staging-next into staging 2026-08-17 06:12:02 +00:00
Michael Daniels
4ab6d24e9a stdenv: compose custom and cross stages without recursive imports (#543332) 2026-08-17 01:37:36 +00:00
Stefan Frijters
dfbf970f31 binutils-patchelfed-ld: enable structuredAttrs (#551832) 2026-08-14 12:30:24 +00:00
Stefan Frijters
9a66230f35 libidn2: enable structuredAttrs, modernize (#551834) 2026-08-14 12:30:04 +00:00
Stefan Frijters
e1a318d761 minimal-bootstrap: enable structuredAttrs for libc, move env variable into env for patchelf (#551835) 2026-08-14 11:18:55 +00:00
John Ericson
92144940a3 gcc/ng: let a platform opt in with useGccNG
Nothing could select the split GCC package set, so none of the fixes
below this commit were reachable from a normal build.

Add `useGccNG` alongside the existing `useLLVM`/`useZig`/`useArocc`
choices, and honour it where a compiler is picked: the cross stdenv takes
`gccNGPackages.gcc`, and `stdenvNoLibs`/`stdenvNoLibc` map to
`gccNoLibgcc` and `gccWithLibgcc`. That last pair is the point of the
split. Both currently fall back to `gccCrossLibcStdenv`, because the
monolithic compiler cannot distinguish them; `lib/systems/default.nix`
says as much next to `linker`, noting that we would like to choose the C
compiler and runtime library orthogonally but "due to the monolithic GCC
build we cannot actually make those choices independently". This is what
lifts that, the way the LLVM set already splits `clangNoCompilerRt` from
`clangNoLibc`.

`gccNGPackages` tracks `default-gcc-version` rather than naming a
release, so the split set and the monolithic `gcc` stay on the same one.

`useGccNG` defaults to `false` and no platform derives it, so no existing
build changes. Setting it on a platform spec is enough to exercise the
whole stack:

    nix-build . -A stdenv.cc --arg crossSystem \
      '{ config = "aarch64-unknown-linux-musl"; useGccNG = true; }'

The intent is to switch obscure low-tier platforms over to it soon --
NetBSD first -- so `ng` gets dogfooded somewhere the blast radius is
small. Those switches come separately.

Assisted-by: Claude Code (Claude Opus 5)
2026-08-12 16:46:18 -04:00
Aliaksandr
4bb4cff368 stdenv: deprecate is* aliases in favor of hostPlatform.is*
These shorthands hide the platform distinction and are unfit for
cross-compilation. Wrap them in `lib.warn` so each access prints a
deprecation notice, and gate them on `config.allowAliases` so they
can be removed entirely.

Assisted-by: claude-code with claude-opus-4-8
2026-08-12 20:27:09 +02:00
Stefan Frijters
7611d6ee9a binutils-patchelfed-ld: enable structuredAttrs 2026-08-12 13:12:25 +02:00
Stefan Frijters
67f2ae770a libidn2: remove unused argument 2026-08-12 13:11:22 +02:00
Stefan Frijters
e8434ae083 minimal-bootstrap: stage2: move NIX_CFLAGS_COMPILE override into env 2026-08-12 13:09:07 +02:00
Stefan Frijters
6ac83a3762 minimal-bootstrap: stage0: enable structuredAttrs for libc in dummyStdenv 2026-08-12 13:08:08 +02:00
Aliaksandr
f8b9b7a087 stdenv/darwin: move the libiconv alias assertion into tests.stdenv
The final stage asserted

    assert prevStage.libiconv == prevStage.darwin.libiconv;

On Darwin `libiconv` is `darwin.libiconv`, so this compares a value with
itself. Nix does not notice: `eqValues` short-circuits only on pointer
identity of the two value slots, and these are two slots that resolve to
one attribute set. It therefore falls through to the derivation case,
which compares `outPath`.

`lib.extendDerivation` guards `outPath` behind the derivation's validity,
which reads `config.allowUnfree`, so the assertion demanded a `config`
option while the package set was still being assembled. When `config` is a
function it is passed `pkgs`, and the loop closes:

    (import <nixpkgs> {
      system = "aarch64-darwin";
      config = { pkgs, lib, ... }: { allowUnfree = lib.isAttrs pkgs; };
    }).config.allowUnfree

failed with an infinite recursion on Darwin while evaluating on Linux,
whose stdenv never forces a derivation that early. It now evaluates on
both.

Keep checking the invariant, from `tests.stdenv` instead. By then the
package set is complete, so forcing `outPath` is just a read.
The other twelve assertions in the stage read `passthru` and
`stdenv.cc.cc`, which are ungated, and stay where they are.

Assisted-by: claude-code with claude-opus-5[1m]-high
2026-08-10 00:50:54 +03:00
isabel
8c67d9d6ce check-meta: targeted performance cleanups (#548898) 2026-08-09 06:41:19 +00:00
Eman Resu
b3856a700b check-meta: only check unfree predicate if it's defined 2026-08-03 14:32:15 -04:00
Eman Resu
db1fbad58f check-meta: partially apply platform logic as much as possible 2026-08-03 14:26:33 -04:00
Eman Resu
1dcefd5752 check-meta: add clarifying comment on license lists 2026-08-03 14:12:35 -04:00
Eman Resu
45d8da095c check-meta: avoid an isAttrs check that ? already performs 2026-08-03 14:12:32 -04:00
Eman Resu
a0e005ebca check-meta: inherit functions to global scope 2026-08-03 14:12:31 -04:00
Eman Resu
c3481d9ef9 check-meta: use ? instead of or for isMarkedInsecure
This is almost always not defined, so we can avoid needing to perform
the equality check on the singleton lists.
2026-08-03 14:12:22 -04:00
Eman Resu
73c12f9fdb check-meta: cache allowInsecure as much as possible 2026-08-03 13:30:02 -04:00
Ben Siraphob
b5e73a0b2d pkgs: fix typos in stdenv, build-support, top-level and test
Assisted-by: Claude Code (claude-opus-5)
2026-08-02 11:15:27 -07:00
Eman Resu
270c9c9792 check-meta: cache allowUnfree 2026-08-01 11:36:04 -04:00
Eman Resu
83dabb3741 check-meta: cache where unsupported systems are allowed 2026-08-01 11:35:29 -04:00
Eman Resu
ef74004766 check-meta: cache a nonempty blocklist 2026-08-01 11:34:59 -04:00
Aliaksandr
2dd1349006 stdenv: stop passing crossSystem to local stages
The dispatcher now constructs local bootstrap stages directly, so their target is represented entirely by localSystem. Remove the redundant crossSystem arguments and equality assertions from each local stage implementation.

Assisted-by: codex with gpt-5.6-sol-high
2026-07-19 00:11:51 +03:00
Aliaksandr
bbb150a331 stdenv: remove redundant cygwin switch
Its already handled by `or stagesNative` condition
2026-07-18 23:38:54 +03:00
Aliaksandr
0a354bd12a stdenv: remove redundant replacement assertions
Stage selection already guarantees matching local platforms before applying replaceStdenv.

Assisted-by: codex with gpt-5.6-sol-high
2026-07-18 23:15:02 +03:00
Aliaksandr
6183cdb311 stdenv: inline the replacement stage
The replaceStdenv branch already guarantees that the appended stage is required.

Assisted-by: codex with gpt-5.6-sol-high
2026-07-18 23:14:57 +03:00
Aliaksandr
196bcb0c78 stdenv: avoid reimporting bootstrap stages
Select local bootstrap stages once and pass them to custom and cross stage composition.

Assisted-by: codex with gpt-5.6-sol-high
2026-07-18 23:14:53 +03:00
Aliaksandr
3d537076cb stdenv: fix replaceStdenv evaluation
Pass empty crossOverlays from the custom stdenv bootstrap and cover it with a regression test.

Assisted-by: codex with gpt-5.6-sol-high
2026-07-17 05:08:02 +03:00
nixpkgs-ci[bot]
5b0a62639f Merge master into staging-next 2026-07-08 06:51:14 +00:00
adisbladis
56e510df3a lib.meta-types: add binary either/both combinators (#537659) 2026-07-08 05:20:33 +00:00
Ben Siraphob
45ecf43c51 lib.meta-types: add binary either/both combinators
Every in-tree union/intersection use has exactly two members, and the
binary form verifies without allocating a closure or calling the any/all
primop per check. check-meta.nix switches to either/both; union and
intersection are kept for potential future use.

Assisted-by: Claude Code (Claude Fable 5)
2026-07-07 09:40:17 -07:00
nixpkgs-ci[bot]
a692067795 Merge master into staging-next 2026-07-04 00:35:57 +00:00
Eman Resu
9ab8fa7375 check-meta: compare with null instead of using isNull 2026-07-03 19:00:46 -04:00
Martin Weinelt
9ade44f1d4 Merge remote-tracking branch 'origin/staging' into staging-next
Conflicts:
- pkgs/top-level/nixpkgs-basic-release-checks.nix
2026-06-27 01:13:12 +02:00
Matt Sturgeon
288d25fabf Allow meta.problems while preventing internal use of certain kinds (#533376) 2026-06-26 21:44:52 +00:00
Emily
fa7fbd4ac9 darwin.Csu: drop 2026-06-26 18:28:11 +01:00
Emily
17a4d7bc6a stdenv/darwin: drop x86_64-darwin bootstrap tools 2026-06-26 07:36:05 +01:00
Silvan Mosberger
a90d993610 ci/eval: Allow preventing internal Nixpkgs use of certain problem kinds 2026-06-24 12:26:03 +02:00
nixpkgs-ci[bot]
92fd31e931 Merge staging-next into staging 2026-06-23 00:19:28 +00:00
Emily
c6e7a2d1b3 stdenv/darwin/stdenv-bootstrap-tools: drop x86_64-darwin special case (#492105) 2026-06-23 00:09:43 +00:00
nixpkgs-ci[bot]
03a9b0542e Merge staging-next into staging 2026-06-21 18:33:29 +00:00
Sandro
e00726a075 treewide: fix leftover docbook links (#531477) 2026-06-21 18:03:51 +00:00
nixpkgs-ci[bot]
d94448ae90 Merge staging-next into staging 2026-06-21 00:51:18 +00:00
Eman Resu
50cf7fe9dc stdenv/check-meta: move to within lib/
This is going to be used in lib.systems, which isn't allowed to import
from outside the lib folder. We don't actually expose this through lib,
though.
2026-06-20 17:05:33 -04:00
Silvan Mosberger
8fcbb35929 meta.problems: Fill out output meta with final list of problems
This ensures that external tooling can also process the problems, and
helps users with debugging.
2026-06-19 18:58:37 +02:00
Silvan Mosberger
eba1d51352 meta.problems: Internal refactoring
Makes future changes easier
2026-06-19 18:58:10 +02:00
nixpkgs-ci[bot]
c2062a4892 Merge staging-next into staging 2026-06-19 00:56:24 +00:00
Cosima Neidahl
a6896b9ecb pkgs/stdenv/linux: update powerpc64le-unknown-linux-gnu bootstrap-files (#502868) 2026-06-18 20:33:36 +00:00