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"
```
Fixes this error:
gnuplot> plot [-5:5] sin(x)
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could
be initialized. Reinstalling the application may fix this problem.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.
This update was made based on information from https://repology.org/metapackage/gnuplot/versions.
These checks were done:
- built on NixOS
- ran ‘/nix/store/3kixi49gqbpjnkrgdavmzkbsg7aaw51p-gnuplot-5.2.3/bin/gnuplot -h’ got 0 exit code
- ran ‘/nix/store/3kixi49gqbpjnkrgdavmzkbsg7aaw51p-gnuplot-5.2.3/bin/gnuplot --help’ got 0 exit code
- ran ‘/nix/store/3kixi49gqbpjnkrgdavmzkbsg7aaw51p-gnuplot-5.2.3/bin/.gnuplot-wrapped -h’ got 0 exit code
- ran ‘/nix/store/3kixi49gqbpjnkrgdavmzkbsg7aaw51p-gnuplot-5.2.3/bin/.gnuplot-wrapped --help’ got 0 exit code
- found 5.2.3 with grep in /nix/store/3kixi49gqbpjnkrgdavmzkbsg7aaw51p-gnuplot-5.2.3
- directory tree listing: https://gist.github.com/c09c0907f914e36a3f7c086d4b978dbf
There is probably a way to have it work with substituteInPlace, but
using sed is a cheap solution to not having to figure out how to escape
"'$'" in Nix that works in both versions.
Issue #31179.
Fixes#33833.