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"
```
stdenv.targetPlatform really shouldn't be used by software that
doesn't generate or manipulate binaries. I reviewed all uses of
targetPlatform outside of pkgs/development/compilers and pkgs/stdenv
and replaced those which weren't involved in something which fits
these criteria.
Fix two configure checks that fail on clang 16 due to unexpected errors:
* Undefined type `uint8_t` by including `stdint.h`; and
* Unused `sa_len_ptr` by incrementing the target of the pointer.
Prior to this commit, dante's configure-time getaddrinfo() checks
were disabled only if stdenv.hostPlatform.isMips64.
These checks must also be disabled if the buildPlatform cannot
execute hostPlatform binaries. This commit factors out the control
of this disablement as a flag and adds an additional situation in
which that flag is enabled.
Let's remove the hardwired PATH= setting from the redefgen.sh script
which is executed when autoreconfHook is enabled. This resolves the
following failure:
build flags: SHELL=/nix/store/i2k8pqqzrmaafz2lf1dly1w96n4xpf2w-bash-5.1-p16/bin/bash
Making all in include
make[1]: Entering directory '/build/dante-1.4.3/include'
make all-am
make[2]: Entering directory '/build/dante-1.4.3/include'
sh ../include/redefgen.sh ../include
../include/redefgen.sh: line 13: egrep: command not found
../include/redefgen.sh: line 13: egrep: command not found
../include/redefgen.sh: line 13: awk: command not found
Semi-automatic update. These checks were performed:
- built on NixOS
- ran `/nix/store/3z75x46yp38ckpdvadhdk2mnvj1dz79s-dante-1.4.2/bin/sockd -h` got 0 exit code
- ran `/nix/store/3z75x46yp38ckpdvadhdk2mnvj1dz79s-dante-1.4.2/bin/sockd -v` and found version 1.4.2
- ran `/nix/store/3z75x46yp38ckpdvadhdk2mnvj1dz79s-dante-1.4.2/bin/sockd -h` and found version 1.4.2
- found 1.4.2 with grep in /nix/store/3z75x46yp38ckpdvadhdk2mnvj1dz79s-dante-1.4.2
- found 1.4.2 in filename of file in /nix/store/3z75x46yp38ckpdvadhdk2mnvj1dz79s-dante-1.4.2