When building derivations that depends on rpm on darwin, we get the
following error:
```
dyld[69225]: Library not loaded: /nix/store/cz9sppfrs9ag34lq2pq6wmhspwcnvbxq-rpm-sequoia-1.7.0/lib/librpm_sequoia.1.7.0.dylib
Referenced from: <0EA94AC5-F54A-3791-9374-4092232F33A1> /nix/store/mak6qp2pvgz19dn0fb0pr2lksgca43qp-rpm-4.20.0/lib/librpmio.10.2.0.dylib
Reason: tried: '/nix/store/cz9sppfrs9ag34lq2pq6wmhspwcnvbxq-rpm-sequoia-1.7.0/lib/librpm_sequoia.1.7.0.dylib' (no such file), '/System/Vol>
cpio: premature end of archive
```
This commit adds the correct symlinks on darwin.
We are migrating packages that meet below requirements:
1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration
The tool is here: https://github.com/Aleksanaa/by-name-migrate.
The usboot repo comes with a bunch of different gadgets
which can be used to boot Raspberry Pis via a USB boot cable.
Until now, we have only included the `msd` (Mass-storage device).
However, this gadget is deprecated and has since been replaced by
the `mass-storage-gadget`. Furthermore, there are now more gadgets
like the one for configuring secure boot or update/recover RPi4/5
boot eeprom.
This change installs the new gadgets under $out/usr/share/rpiboot.
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"
```
Reproduction script:
# Bulk rewrite
./maintainers/scripts/sha-to-sri.py pkgs/by-name
# Revert some packages which will need manual intervention
for n in amdvlk azure-cli cargo-profiler corefonts flatito fluxcd gist perf_data_converter protoc-gen-js solana-cli swt verible; do
git checkout -- "pkgs/by-name/${n:0:2}/${n}"
done