3418 Commits

Author SHA1 Message Date
nixpkgs-ci[bot]
09c3691947 Merge master into staging-nixos 2026-06-01 19:40:02 +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
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
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
Philip Taron
e03d0a783d various: reduce // merges, optimize ++ chains across hot paths (#506793) 2026-05-27 22:06:37 +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
Hans Joachim Kliemeck
8478c2384b stdenv: Package URL (PURL) metadata fields 2026-05-26 21:47:54 +02: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
yaya
e397801100 treewide: replace lib.trivial.release with hardcode version (hack) (#517985) 2026-05-24 11:11:46 +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
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
Eman Resu
abae302132 stdenv.mkDerivation: move config lookups to global scope 2026-05-19 22:38:33 -04:00
Eman Resu
a351d833a2 stdenv.mkDerivation: move pos thunk inside another thunk 2026-05-19 21:16:57 -04:00
Eman Resu
a53a185737 stdenv.mkDerivation: inline call to toExtension 2026-05-19 21:14:17 -04:00
Aliaksandr
a42becdd92 stdenv/generic: replace // optionalAttrs with nullable attr names
Convert 3 optionalAttrs in the stdenv derivation call to nullable
attribute names: allowedRequisites, contentAddressedByDefault, and
isDarwin sandbox/impureHostDeps.
2026-05-18 03:54:26 +03:00
Aliaksandr
d6d58a85e1 make-derivation: remove no longer valid comment
The comment claimed configureFlags is "sometimes a string, sometimes
null, and sometimes a list" — the normalization it referenced was
removed long ago; configureFlags is always a list now.
2026-05-18 03:54:18 +03:00
Michael Daniels
e4da0a7e03 Merge branch 'master' into staging-next 2026-05-17 20:04:53 -04:00
Eman Resu
04078604e8 stdenv.mkDerivation: warn on nested lists 2026-05-16 22:12:08 -04:00
nixpkgs-ci[bot]
e43fd15291 Merge master into staging-next 2026-05-16 18:20:34 +00:00
adisbladis
a24cd2fd27 stdenv/adapters: foldl -> foldl' 2026-05-16 15:51:29 +12:00
nixpkgs-ci[bot]
cdaa8f2aeb Merge master into staging-next 2026-05-11 16:10:22 +00:00
Michael Daniels
ab2fe22124 stdenv/check-meta: verify that licenses aren't derivations
Among other things, "zlib" is a license, and it's difficult to debug the eval
errors that occur when that derivation gets added to meta.licenses.
2026-05-11 08:12:01 -04:00
adisbladis
8e46c489d0 stdenv.mkDerivation: Optimise hardening flag handling 2026-05-10 16:16:46 +12:00
nixpkgs-ci[bot]
18bb448d8a Merge master into staging-next 2026-05-10 03:06:06 +00:00
Eman Resu
1aea84e9f7 stdenv.mkDerivation: inherit all builtins 2026-05-09 20:37:46 -04:00
Eman Resu
13fb2f08dc stdenv.mkDerivation: inherit all lib variables 2026-05-09 20:37:33 -04:00
nixpkgs-ci[bot]
97a25f9a22 Merge master into staging-next 2026-05-10 00:37:28 +00:00
Eman Resu
789a15ef68 stdenv.mkDerivation: move attrs removed for derivationArg to global scope 2026-05-09 20:37:22 -04:00
Eman Resu
9f278a55db stdenv.mkDerivation: store default builder args in global scope 2026-05-09 20:37:14 -04:00
Eman Resu
8de09cd1f8 stdenv.mkDerivation: move reference checking attrs to global scope 2026-05-09 20:37:11 -04:00
Eman Resu
57c99d5722 stdenv.mkDerivation: move list of attribute names out to global scope 2026-05-09 20:27:58 -04:00
Eman Resu
dfa34d9376 stdenv.mkDerivation: move attrNames out of happy path 2026-05-09 20:26:45 -04:00
Eman Resu
2113c381ea stdenv.mkDerivation: move errors variable out of happy path 2026-05-09 20:26:44 -04:00
Eman Resu
95a031c363 stdenv.mkDerivation: remove assertMsg usage
Saves function calls on the happy path.
2026-05-09 20:26:42 -04:00
Eman Resu
9c1453602e stdenv.mkDerivation: only create enabledHardeningOptions variable if necessary 2026-05-09 20:26:08 -04:00
Eman Resu
32dc7f6f02 stdenv.mkDerivation: inline hardeningDisable'
We can safely check `elem "all" hardeningDisable'` on the original list,
because calling `unique` and `concretizeFlagImplications` will never
change whether the list contains "all".
2026-05-09 20:26:08 -04:00
Eman Resu
faf7bd1d38 stdenv.mkDerivation: move concretizeFlagImplications to global scope 2026-05-09 20:26:08 -04:00
Emily
8bbdac1eaa stdenv.mkDerivation: follow-up performance improvements (#513858) 2026-05-09 23:51:36 +00:00
Eman Resu
152d862bb0 stdenv.mkDerivation: cache output checks to avoid reallocating 2026-05-09 19:25:03 -04:00
Eman Resu
fc43f076bb stdenv.mkDerivation: avoid listToAttrs if outputChecks will end up empty 2026-05-09 19:14:47 -04:00
Eman Resu
26b51ec16d stdenv.mkDerivation: avoid concat if separateDebugInfo' is false 2026-05-09 19:11:05 -04:00
Eman Resu
fde4f1c5a0 stdenv.mkDerivation: check meta.mainProgram from original meta
We define a meta variable in the same let block as the result of
the `commonMeta` call. Avoiding evaluating the result of that call
until we need to is preferable.
2026-05-09 18:25:32 -04:00
Eman Resu
ac796e9827 stdenv.mkDerivation: use or statement for default hardening flags
As suggested in PR review:
"It seems like when `!stdenvHasCC`, `stdenv.cc` is `null`. So this could
probably just be `defaultHardeningFlags =
stdenv.cc.defaultHardeningFlags or knownHardeningFlags;`?"
2026-05-09 16:40:36 -04:00
Eman Resu
ce35986f7f stdenv/mkDerivation: only run zipAttrsWith if we have to
If attrs.outputChecks.${name} is undefined, we'd be performing an
unnecessary no-op.
2026-05-09 15:50:15 -04:00