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 URLs don't need to be fetched at evaluation time. This change speeds up evaluation considerably for these components and allows them to be used in Hydra.
When a google-cloud-sdk component does not specify architectures
on components.json we should fallback to all supported arches.
Previously there was a bug where `allArches` were incorrectly
taken from the `attrValues arches` (nixOS architectures) instead of
the GCS ones using `attrNames arches`.
Also added arm to the list of supported architectures. No changes
needed on components.json since it looks urls and hashes were already
there.
Co-authored-by: Fabián Heredia Montiel <fabianhjr@protonmail.com>
This commit adds a set of Google Cloud SDK components in
`pkgs.google-cloud-sdk.components` which can be installed along with
the SDK through `pkgs.google-cloud-sdk.withExtraComponents [ ... ]`.