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"
```
This also makes the options available for reading by other derivations which
depend on SBCL. This is useful e.g. in the case of bordeaux-threads, which
depends on a specific feature of SBCL having been enabled (threads): having the
.threadSupport value readable from the derivation at runtime allows
bordeaux-thread to potentially mark itself as meta.broken for an SBCL without
thread support.
It doesn't build, there hasn't been a release in two years, and
attempting to upgrade to the most recent tag (`v0.4.2-rc.2`) reveals
that it immediately returns exit code 1 without output.
Fallback for when there is no such file (e.g. building from git)
The blanket recreation of this file was removed by me in
d09db9c096 but I hadn’t considered this edge case.
It’s unclear what problem the test patching was trying to solve, but on current
SBCL builds this does more harm than good. Removing those patches leaves the
test in its original state, which builds and passes.
As for the timestamps: also unclear, removing it doesn’t seem to affect anything
either way and this feels very much like a fix for /nix/store read-only
access. I’ve test SBCL without these and it works fine, so I don’t think this is
relevant anymore? Unfortunately there are no comments so it’s hard to know why
these existed.
Upstream has mainlined this patch, the preprocessor macros take care of only
applying the code where necessary. There is no need for nixpkgs to if-guard it
further.