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"
```
Add support for Darwin to convmv. This required disabling the tests as
APFS requires filenames to be valid UTF-8[^1]. This will also affect
Linux if a filesystem that enforces valid UTF-8 is used (such as ZFS
with `utf8only=on`).
While we're here, make some changes to clean up the derivation:
- Replace use of `rec` with `finalAttrs` pattern
- Replace `fetchurl` with `fetchzip`
- Added separate `man` output
- Replace `preBuild` hook with explicit `makeFlags` initialization
- Replace explicit `patchPhase` override with `prePatch` hook
- Enable `strictDeps`
- Disable redundant `patchShebangs` call (already done in `prePatch`
hook)
- Address lints from `nixpkgs-hammer`
- Reformat with `nixfmt-rfc-style`
- Migrate to pkgs/by-name
[^1]: https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/APFS_Guide/FAQ/FAQ.html