e0464e4788
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" ``` |
||
---|---|---|
.. | ||
patches | ||
common.nix | ||
default.nix | ||
nix-perl.nix | ||
README.md |
Steps for Testing New Releases
Patch Releases or Updating nixVersions.{latest,git}
Branch to merge into: master or release-$nixos-version
Build the affected Nix packages and run their tests on the following platforms: x86_64-linux, aarch64-linux, x86_64-darwin, and aarch64-darwin. If you lack the necessary hardware for these platforms, you may need to ask others for assistance with the builds. Alternatively, you can request access to the Nix community builder for all platforms here and here.
To build all dependent packages, use:
nix-review pr <your-pull-request>
And to build all important NixOS tests, run:
# Replace $version with the actual Nix version
nix-build nixVersions.nix_$version.tests
Be sure to also update the nix-fallback-paths
whenever you do a patch release for nixVersions.stable
# Replace $version with the actual Nix version
curl https://releases.nixos.org/nix/nix-$version/fallback-paths.nix > nixos/modules/installer/tools/nix-fallback-paths.nix
Major Version Bumps
If you're updating nixVersions.stable
, follow all the steps mentioned above, but use the staging branch for your pull request (or staging-next after coordinating with the people in matrix #staging:nixos.org
)
This is necessary because, at the end of the staging-next cycle, the NixOS tests are built through the staging-next-small jobset.
Especially nixos installer test are important to look at here.