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 78e9caf153
result/bin/apply-formatting $NIXPKGS_PATH
`jdk8` cross still broken
Using `__spliced.depsBuildBuild` to reduce rebuilds/space usage because it does not seem to matter if
it's that or `buildHost`
`depsBuildBuild` `configure: error: Could not find required tool for BUILD_CC`
`zlib` in `nativeBuildInputs`
```
/build/source/src/java.base/share/native/libzip/Adler32.c:33:10: fatal error: zlib.h: No such file or directory
33 | #include <zlib.h>
| ^~~~~~~~
compilation terminated.
make[4]: *** [lib/CoreLibraries.gmk:88: /build/source/build/linux-aarch64-server-release/buildjdk/support/native/java.base/libzip/Adler32.o] Error 1
make[4]: *** Waiting for unfinished jobs....
/build/source/src/java.base/share/native/libzip/CRC32.c:32:10: fatal error: zlib.h: No such file or directory
32 | #include <zlib.h>
| ^~~~~~~~
compilation terminated.
/build/source/src/java.base/share/native/libzip/Deflater.c:35:10: fatal error: zlib.h: No such file or directory
35 | #include <zlib.h>
| ^~~~~~~~
compilation terminated.
make[4]: *** [lib/CoreLibraries.gmk:88: /build/source/build/linux-aarch64-server-release/buildjdk/support/native/java.base/libzip/CRC32.o] Error 1
make[4]: *** [lib/CoreLibraries.gmk:88: /build/source/build/linux-aarch64-server-release/buildjdk/support/native/java.base/libzip/Deflater.o] Error 1
make[3]: *** [Main.gmk:191: java.base-libs] Error 2
make[2]: *** [make/Main.gmk:589: create-buildjdk-interim-image] Error 2
make[2]: *** Waiting for unfinished jobs....
ERROR: Build failed for target 'images' in configuration 'linux-aarch64-server-release' (exit code 2)
Stopping javac server
```
These will still be available in the Git history if anyone wants to
try resurrecting a source‐based OpenJDK bootstrap in the future. In
the meantime they’re just confusing to have around unreferenced.
In preparation for the deprecation of `stdenv.isX`.
These shorthands are not conducive to cross-compilation because they
hide the platforms.
Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way
One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059
There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.
```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```