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"
```
These flags are not part of waf, they're custom flags that are not
widely implemented. More packages are broken because of these flags
being added than actually recognise them.
Of the packages in Nixpkgs that directly depend on wafHook that we can
attempt to cross compile (i.e. all their dependencies cross compile),
5 already successfully cross compile and recognise these flags, 2
already successfully cross compile because they have been opted out of
these flags, 3 don't cross compile successfully for reasons unrelated
to these flags, and for the remaining 7, the only thing stopping them
cross compiling successfully is that they are being passed these flags
that they don't recognise.
All of the five successfully cross-compiling packages that do
recognise these flags are samba projects: ldb, talloc, tdb, tevent,
and samba4. So this isn't a general waf convention, just a samba one.
It therefore doesn't make sense to set these flags by default. They
should just be included in the expressions for each samba project,
like all the other quirks common to samba build systems.
This change fixes cross compilation of the following packages:
blockhash ganv ndn-cxx mda_lv2 pflask raul saldl
c733f0bf8a switched JACK to using overlay-style
mkDerivation, but forgot to change a reference to `version` to `finalAttrs.version`.
This wasn't caught at eval time because `with lib` was used, making the
source derivation try to fetch (at the time of writing) tag "23.05pre-git",
which obviously doesn't exist :D
Thanks to V for catching this [0].
[0]: https://github.com/NixOS/nixpkgs/pull/216096#issuecomment-1437763295
*Flags implies a list
slightly relevant:
> stdenv: start deprecating non-list configureFlags https://github.com/NixOS/nixpkgs/pull/173172
the makeInstalledTests function in `nixos/tests/installed-tests/default.nix` isn't available outside of nixpkgs so
it's not a breaking change