Home Explore Blog Models CI



nixpkgs

pkgs/tools/package-management/nix/README.md
529f9beca7f77805629138290b8142eb179264a42011aebf00000003000006cd
# 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](https://github.com/NixOS/aarch64-build-box) and [here](https://nix-community.org/community-builder/).

To build all dependent packages, use:

```
nixpkgs-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](https://hydra.nixos.org/jobset/nixos/staging-next-small) jobset.
Especially NixOS installer tests are important to look at here.

There is a script to update minor versions:

```
./pkgs/tools/package-management/nix/update-all.sh
```

Chunks
96b57cd5 (1st chunk of `pkgs/tools/package-management/nix/README.md`)
Title: Steps for Testing New Nix Releases and Updates
Summary
This document outlines the testing procedures for new Nix releases, categorizing them by release type. For patch releases or updates to `nixVersions.{latest,git}`, changes should be merged into `master` or `release-$nixos-version`. Testing involves building affected packages and running their tests on `x86_64-linux`, `aarch64-linux`, `x86_64-darwin`, and `aarch64-darwin` platforms, potentially requiring community builder access. Specific commands like `nixpkgs-review pr` and `nix-build nixVersions.nix_$version.tests` are provided, along with instructions to update `nix-fallback-paths.nix` for patch releases. For major version bumps (updating `nixVersions.stable`), all previous steps apply, but the pull request should target the `staging` or `staging-next` branch, due to the importance of NixOS installer tests built via the `staging-next-small` jobset. A script `./pkgs/tools/package-management/nix/update-all.sh` is mentioned for updating minor versions.