Commit Graph

3504 Commits

Author SHA1 Message Date
nixpkgs-ci[bot]
59fccc960c Merge staging-next into staging 2026-06-14 07:38:15 +00:00
adisbladis
0e62149625 stdenv/problems: only run problem if it's not ignored (#519600) 2026-06-14 06:27:38 +00:00
Sandro Jäckel
6c0cb2defd treewide: fix leftover docbook links 2026-06-13 23:37:09 +02:00
SandaruKasa
811bd13927 diffutils: move to by-name
Also drop diffutils from the `inherit (prevStage)` overrides in
pkgs/stdenv/linux/default.nix. Once the package lives in pkgs/by-name,
that pin gives the top-level `diffutils` attribute a source location
even though it is defined via `_internalCallByNamePackageFile`, which
nixpkgs-vet rejects (NPV-102). Dropping the pin lets the by-name
auto-definition stand on its own, at the cost of no longer reusing the
bootstrap-stage build (a stdenv-class rebuild, hence staging).

Co-authored-by: Philip Taron <philip.taron@gmail.com>
Assisted-by: Claude Code (claude-opus-4-8)
2026-06-10 13:55:14 -07:00
Philip Taron
a0fc5f42c2 stdenv: linux: simplify bootstrap by inheriting per-stage packages (#519965) 2026-06-07 12:53:02 +00:00
nixpkgs-ci[bot]
7fa1388d2b Merge staging-next into staging 2026-06-06 18:29:05 +00:00
Aliaksandr
b9e5206274 stdenv: drop redundant crossOverlays defaults
The only callers are pkgs/top-level/default.nix and pkgs/stdenv/cross/default.nix always pass crossOverlays. Make the
argument required to keep the internal interface explicit.
2026-06-06 06:05:24 +03:00
Aliaksandr
125de9a4c3 stdenv: do not pass crossOverlays redundantly
crossOverlays only needed for stageCross, so lets pass them only there
2026-06-06 06:04:25 +03:00
Aliaksandr
1d37095ba0 stdenv: linux: inherit libxcrypt at xgcc/stage2
libxcrypt was built twice (xgcc and stage2). Adding it to the inherit list
at xgcc and stage2 chains it through: stage1 produces the single build,
xgcc/stage2/stage3 inherit. Total bootstrap-stage builds: 2 -> 1.

libxcrypt is build-time-only — it is needed at build time by tools that
support libcrypt-style password hashing, but its `out` is not in the final
stdenv runtime closure (glibc no longer depends on libxcrypt at runtime;
applications that need it link directly).

Safe with respect to the `disallowedRequisites` check on the final
stdenv-linux.
2026-06-06 03:56:13 +03:00
Aliaksandr
dcda21b155 stdenv: linux: inherit python3Minimal at stage3/stage4
python3Minimal was being rebuilt at stages 3 and 4. It is used only as a
native build input (e.g. meson, glib build helpers); its outputs do not
appear in the final stdenv's runtime closure.

Inheriting from prevStage at stage3 and stage4 collapses 2 -> 1 build.

Build-only dependency, safe with respect to the `disallowedRequisites`
check on the final stdenv-linux.
2026-06-06 03:56:12 +03:00
Aliaksandr
f40b936a86 stdenv: linux: inherit autoconf269 at stage2/stage3
autoconf269 was being rebuilt at stages 2 and 3. It is used only as a
native build input (to regenerate `configure` scripts in autotools-using
packages); its outputs never appear in the final stdenv's runtime closure.

Inheriting it from prevStage at stage2 and stage3 collapses 2 -> 1 build.

Build-only dependency, safe with respect to the `disallowedRequisites`
check on the final stdenv-linux.
2026-06-06 03:56:12 +03:00
Aliaksandr
4df3376569 stdenv: linux: inherit nukeReferences through xgcc/stage2/stage3
nukeReferences was rebuilt at every stage where it appeared (xgcc, stage2,
stage3 — 3 redundant builds beyond stage1's initial build). It is used only
at build time (to scrub references from libidn2/libunistring at stage2),
never appears in the final stdenv's runtime closure, and its outputs are
not propagated into other final-closure derivations.

Adding it to the inherit list at xgcc, stage2, and stage3 collapses the
chain to a single stage1 build. Stage4 still produces its own nukeReferences
through the regular package set; that one is unused by the final stdenv.

Build-only dependency, so this is safe with respect to the
`disallowedRequisites` check on the final stdenv-linux.
2026-06-06 03:56:11 +03:00
Aliaksandr
053f02f232 stdenv: linux: drop dead dejagnu.doCheck=false override from stage2
dejagnu is never demand-built in the bootstrap closure (verified via
`nix-store --query --requisites | grep dejagnu` returning empty on
master). The override existed but the resulting derivation was never
referenced by anything stage2+ actually builds.

Verified by drv-hash equality: stdenv.drvPath is unchanged
(q2xn5647kadsgpz40xcmjssa0pmdmiwi-stdenv-linux.drv).
2026-06-06 03:56:11 +03:00
Aliaksandr
0a27772068 stdenv: linux: drop dead enableGold=false override from stage1
The override at `super.binutils-unwrapped.override { enableGold = false; }`
defined a stage1 `binutils-unwrapped` derivation that was never used:
xgcc-stage and stage2 both build their own fresh `super.binutils-unwrapped`
without inheriting from stage1, so the gold-disabled rebuild never appeared
in the build graph (verified via `nix-store --query --requisites`).

Verified by drv-hash equality: stdenv.drvPath is unchanged
(q2xn5647kadsgpz40xcmjssa0pmdmiwi-stdenv-linux.drv).
2026-06-06 03:56:11 +03:00
Aliaksandr
5c20ed83dd stdenv: linux: centralise updateAutotoolsGnuConfigScriptsHook in stageFun
The hook was added six times — once in each of stages 1, xgcc, 2, 3, 4
(and again at the final stdenv) — to teach configure scripts about
non-x86_64 architectures. Wire it once inside stageFun instead, guarded
by `prevStage ? updateAutotoolsGnuConfigScriptsHook` so the dummy stage
(whose prevStage is the raw stub) is unaffected.

The final stdenv (built outside stageFun) keeps its explicit entry.

Eval-verified: stdenv.drvPath is unchanged from master
(q2xn5647kadsgpz40xcmjssa0pmdmiwi-stdenv-linux.drv).
2026-06-06 03:56:06 +03:00
Eman Resu
85e32af8ef stdenv/problems: don't create pname variable
A package failing an automatic problem (of which there's currently only
one) is rare. A package having meta.problems specified is even rarer.
Inlining the getName call to its two usages saves a thunk in the vast,
vast majority of cases, and I consider it to be worth it.
2026-06-01 23:05:22 -04:00
Eman Resu
0b304744b8 stdenv/problems: make handlerForProblem more performant with partial application 2026-06-01 23:05:13 -04:00
Eman Resu
41bafcbc34 stdenv/problems: reverse parameter order for handlerForProblem
kind and name are more likely to stay the same. Doing this allows us to
cache the kind and name when calling the handler for a problem.
2026-06-01 23:05:13 -04:00
Eman Resu
753e43c931 stdenv/problems: avoid a lookup for meta.broken
The stats may be lying to me when they say that this saves 1.86% of
attrset lookups, and `?` may just not be accurately tracked. But at
worst, performance will stay the same, since the check will fail for all
non-broken packages. And who knows, maybe it does help, by nature of not
checking the value!
2026-06-01 23:05:12 -04:00
Eman Resu
5616e3d925 stdenv/problems: use early knowledge of allowBroken and allowBrokenPredicate 2026-06-01 23:05:10 -04:00
Eman Resu
b88fba2fba stdenv/problems: avoid creating manual problems attrset 2026-06-01 23:05:01 -04:00
nixpkgs-ci[bot]
a0ee92dfa2 Merge staging-next into staging 2026-06-02 00:49:58 +00:00
nixpkgs-ci[bot]
09c3691947 Merge master into staging-nixos 2026-06-01 19:40:02 +00:00
nixpkgs-ci[bot]
d644c92282 Merge staging-next into staging 2026-06-01 19:39:24 +00:00
Emily
0c19eb3e55 lib/systems: unify ARMv5 platforms with stock kernel configuration
The `sheevaplug` kernel configuration was added a very long time
ago and has not been adjusted for years. `pogoplug4` was identical
to `sheevaplug` except for an even more stripped‐down kernel
configuration, no device tree support, and a different load address
for the uImage.

These days, the stock kernel configuration builds and there has been
an upstream device tree for the Pogoplug Series 4 for years; unify
`sheevaplug` and `pogoplug4` into an `armv5tel-multiplatform` that
uses the standard configuration.

ARMv5 was also the only platform that defaulted to uImage, the [legacy
U‐Boot image format] that is deprecated upstream. Our bootloader
machinery in NixOS does not handle these images in any special way
and even the original ARMv6 Raspberry Pi platform defaults to the
standard zImage. We switch `armv5tel-multiplatform` to zImage to match.

[legacy U‐Boot image format]: https://docs.u-boot.org/en/latest/usage/cmd/bootm.html#legacy-boot

It is of course natural to worry about backwards compatibility
here: this switches to a different kernel image format and drops
support for root on NFS along with random oddities like KGDB and
LatencyTOP. Renaming the platform is intended to help mitigate
this risk.

The reality, however, is that it is currently very
difficult to build a configuration for ARMv5. I found
<https://github.com/thefloweringash/sheevaplug-nix> online as
an example configuration from many years ago; it already set
`autoModules`, and builds U‐Boot using `CONFIG_DISTRO_DEFAULTS`,
which should work out of the box without requiring the legacy U‐Boot
image format.

Even then, however, I confirmed with the author that it hasn’t
been used in years, and I could barely get it to build with
a modern Nixpkgs: OpenSSH is broken, Nix is broken, multiple
default `environment.systemPackages` in the SD image profile
are broken, `boot.initrd.includeDefaultModules` is broken, and
`hardware.enableAllHardware` is broken.

I conclude that if anyone is actively building systems on ARMv5, they
have a forked Nixpkgs or a very custom setup. Given our general move
to standard boot chains and no platform‐specific hacks, and the
decaying state of our unofficial support for 32‐bit ARM, I think
it is not worth maintaining support for the legacy image format for
this one ancient platform.

If anyone is running a heavily stripped‐down NixOS configuration on
mission‐critical SheevaPlugs using a custom Nix‐free deployment
setup relying on the legacy U‐Boot image format and somehow none
of these kernel changes manage to loudly break their build, hopefully
they’ll at least notice the release notes entry! Otherwise there’s
always JTAG…
2026-06-01 11:12:17 +10:00
Randy Eckenrode
8fc19d25f3 darwin.stdenv: fix infinite recursion due to Python 3.14 upgrade 2026-05-30 03:53:16 +02:00
Eman Resu
c546655fb0 check-meta: only take hostPlatform for functions requiring it
By doing this, we can cache the rest of the file, including the import
of problems.nix. This allows genCheckProblems to be cached on every
bootstrapping stage, and not re-called each time.
2026-05-29 16:51:26 -04:00
Eman Resu
159a6daf6b stdenv/generic: memoise passing config to mkDerivation unless overriden 2026-05-29 16:51:25 -04:00
Eman Resu
2c9c2fd429 stdenv/generic: store default native build inputs outside of stdenv 2026-05-28 19:34:54 -04:00
Eman Resu
4e54346578 make-derivation.nix: take args one at a time, declare variables early
While bootstrapping stdenv, we'd prefer not to call the entire file the
whole time on every single stage, since we have certain args ahead of
time.
2026-05-28 19:34:51 -04:00
nixpkgs-ci[bot]
f50dc660d4 Merge staging-next into staging 2026-05-28 18:54:19 +00:00
Philip Taron
19bd880f94 various: remove lib.warnIf from most critical functions (#524541) 2026-05-28 15:50:31 +00:00
Eman Resu
7146b6678f stdenv.mkDerivation: remove warnIf usage
warnIf sends our warning message through a function call, even if the
warning condition doesn't trigger. This requires a lot of thunk
allocation that can be easily avoided.
2026-05-28 00:19:23 -04:00
nixpkgs-ci[bot]
4e29289792 Merge staging-next into staging 2026-05-28 00:40:40 +00:00
Philip Taron
e03d0a783d various: reduce // merges, optimize ++ chains across hot paths (#506793) 2026-05-27 22:06:37 +00:00
nixpkgs-ci[bot]
2391366a06 Merge staging-next into staging 2026-05-27 18:48:39 +00:00
Ethan Carter Edwards
9d2f2d71e4 doc: add meta.donationPage
This might be a nice way to use our reach to remind users to donate to
FLOSS projects that they use and love.

Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
2026-05-27 00:36:21 -07:00
nixpkgs-ci[bot]
8bde521f6b Merge staging-next into staging 2026-05-27 00:44:40 +00:00
Hans Joachim Kliemeck
8478c2384b stdenv: Package URL (PURL) metadata fields 2026-05-26 21:47:54 +02:00
nixpkgs-ci[bot]
47ef28e66a Merge staging-next into staging 2026-05-26 18:49:26 +00:00
Eman Resu
5c89ab858d stdenv/problems: only run problem if it's not ignored 2026-05-25 23:59:00 -04:00
zowoq
4ed8c15708 pkgs/stdenv/freebsd: update x86_64-unknown-freebsd bootstrap-files
sha256sum of files to be uploaded:

$ sha256sum /nix/store/9hjgqrmhvny7fxg90w8j7d97f7ny8l8w-build/on-server/*
27ed036ed3e7c58cf0637f8f09d1abe986250b3c373afe44328c48d36aecfbd5  /nix/store/9hjgqrmhvny7fxg90w8j7d97f7ny8l8w-build/on-server/bootstrap-tools.tar.xz
89428a0d543e25f14b0529d17309a426d30a312d5f5db512a5218a3ffc18e52f  /nix/store/9hjgqrmhvny7fxg90w8j7d97f7ny8l8w-build/on-server/unpack.nar.xz

Suggested commands to upload files to 'tarballs.nixos.org':

    $ nix-store --realize /nix/store/9hjgqrmhvny7fxg90w8j7d97f7ny8l8w-build
    $ aws s3 cp --recursive --acl public-read /nix/store/9hjgqrmhvny7fxg90w8j7d97f7ny8l8w-build/on-server/ s3://nixpkgs-tarballs/stdenv/x86_64-unknown-freebsd/87c888eedeced2c577b21a86b5bce79b3067ab20
    $ aws s3 cp --recursive s3://nixpkgs-tarballs/stdenv/x86_64-unknown-freebsd/87c888eedeced2c577b21a86b5bce79b3067ab20 ./
    $ sha256sum bootstrap-tools.tar.xz unpack.nar.xz
    $ sha256sum /nix/store/9hjgqrmhvny7fxg90w8j7d97f7ny8l8w-build/on-server/*
2026-05-26 08:31:10 +10:00
nixpkgs-ci[bot]
4878607c11 Merge staging-next into staging 2026-05-24 12:25:16 +00:00
yaya
e397801100 treewide: replace lib.trivial.release with hardcode version (hack) (#517985) 2026-05-24 11:11:46 +00:00
nixpkgs-ci[bot]
3dd8c8415d Merge staging-next into staging 2026-05-24 00:43:24 +00:00
Artemis Tosini
b442a8d76b stdenv/freebsd: upgrade to modern llvm to fix FreeBSD 15 build
Also do some other misc modernization
2026-05-22 12:38:38 -04:00
nixpkgs-ci[bot]
026e06d881 Merge staging-next into staging 2026-05-21 07:19:24 +00:00
adisbladis
3fbd42c407 stdenv.mkDerivation: Optimise hardening flag handling (#517906) 2026-05-21 03:07:31 +00:00
adisbladis
2be5bd483e stdenv.mkDerivation: inline call to lib.toExtension (#522125) 2026-05-21 02:44:04 +00:00
adisbladis
39b86373c9 stdenv.mkDerivation: move config lookups to global scope (#522140) 2026-05-21 02:40:16 +00:00