Commit Graph

3 Commits

Author SHA1 Message Date
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
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"
```
2024-09-25 00:04:37 +03:00
Alex James
d44cc3b616
convmv: add al3xtjames to maintainers 2024-06-28 22:55:28 -05:00
Alex James
9f51e9102d
convmv: add Darwin support, reformat & migrate to pkgs/by-name
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
2024-06-28 22:55:11 -05:00