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"
```
msvcrt is only one of the libcs in MinGW. We therefore
replace explictly testing for msvcrt with the isMinGW
predicate. This lays the foundation for ucrt64 support.
Presence in meta.badPlatforms can be tested with
lib.meta.availableOn, but meta.broken cannot.
I use this to compile as much of my routers' userspace as possible
for Mips64n32, and to automatically detect the few binaries (mostly
those which use boost) cannot and build those for Mips64n64.
Clang 16 began diagnosing ill-formed constant expressions for values
outside the range of enums without a fixed underlying type. While the
error can be suppressed, it will become a hard error in clang 17.
libc++ 15 dropped support for `std::unary_function` and
`std::binary_function` in C++17 and C++20. C++17 is the default for
clang 16, but clang 15 is also affected in those language modes.
This incompatibility is fixed in Boost 1.81, but the late patch for
Boost 1.80 applies to earlier versions and allows those versions to
build with clang 16 (and clang 15 in the affected modes).
The explanation for the conditional introduced by
61d9f201ba is longer than a reasonable
inline comment should be. It directed the reader to use `git blame`,
but that tends to bitrot. Let's point the user to a specific nixpkgs
git hash.
This commit cannot be squashed into the previous commit, because a
commit cannot mention its own commit-hash (without performaing an
expensive double-sha1 preimage attack, of course).
boost-context changed its name for mips from "mips1" to "mips" in this
commit:
6edc8184a7
however the native-build code to detect the local architecture still
reports "mips1":
67c074b249/boostcpp.jam (L637)
Therefore native builds of boost-context on mips must specify
architecture= explicitly; without this you will get link failures
"undefined reference to `jump_fcontext`" in code that uses
boost-context.
Currently the "cross compile" codepath, which provides explicit
architecture/abi/address-model/binary-format/os parameters, is
prefixed by this comment:
```
# TODO: make this unconditional
```
This commit does so, at least if `isMips`.
This commit is needed in order for native builds of nix to succeed on
mips.