Override `finalAttrs.finalPackage` instead of `kernel` from the let-in
block to make configEnv behave in accordance with overrideAttrs of the
result package.
Continuation of commit f10331cf2e ("buildLinux: passthru by
<pkg>.overrideAttrs instead of lib.extendDerivation")
When we set CROSS_COMPILE to set the toolchain prefix, everything
works out of the box without using absolute paths everywhere. This
removes a lot of duplication from the kernel derivations.
Even when building with pkgsLLVM.stdenv where ld is ld.lld and not
binutils ld, the build picks up binutils ld for linking. This prevents
features from working that require ld.lld.
The reason is that when the LD environment variable is not set, Linux
defaults to `ld` as a linker and ld is:
/nix/store/zznja5f8v3jafffyah1rk46vpfcn38dv-gcc-wrapper-13.3.0/bin/ld
GNU ld (GNU Binutils) 2.42
This ld comes from pkgsLLVM.buildPackages.stdenv.cc.
Fix by being more specific about which tools we want to build with.
This just extends what manual-config.nix has already done for quite a
while to avoid similar problems for other tools.
It's important to pass LD and other toolchain environment variables to
`make config` in generate-config.pl, because otherwise `make config`
will also make decisions based on the wrong toolchain.
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19.tar.gz \
--argstr baseRev b32a094368
result/bin/apply-formatting $NIXPKGS_PATH