···3333If 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`)
3434This 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.
3535Especially nixos installer test are important to look at here.
3636+3737+There is a script to update minor versions:
3838+3939+```
4040+./pkgs/tools/package-management/nix/update-all.sh
4141+```
+4
pkgs/tools/package-management/nix/common.nix
···1616 atLeast210 = lib.versionAtLeast version "2.10pre";
1717 atLeast213 = lib.versionAtLeast version "2.13pre";
1818 atLeast214 = lib.versionAtLeast version "2.14pre";
1919+ atLeast218 = lib.versionAtLeast version "2.18pre";
1920 atLeast219 = lib.versionAtLeast version "2.19pre";
2021 atLeast220 = lib.versionAtLeast version "2.20pre";
2122 atLeast221 = lib.versionAtLeast version "2.21pre";
···4243, callPackage
4344, coreutils
4445, curl
4646+, darwin
4547, docbook_xsl_ns
4648, docbook5
4749, editline
···158160 libseccomp
159161 ] ++ lib.optionals withAWS [
160162 aws-sdk-cpp
163163+ ] ++ lib.optional (atLeast218 && stdenv.hostPlatform.isDarwin) [
164164+ darwin.apple_sdk.libs.sandbox
161165 ];
162166163167
+11
pkgs/tools/package-management/nix/update-all.sh
···88cd "$NIXPKGS_DIR"
991010nix_versions=$(nix eval --impure --json --expr "with import ./. { config.allowAliases = false; }; builtins.filter (name: builtins.match \"nix_.*\" name != null) (builtins.attrNames nixVersions)" | jq -r '.[]')
1111+stable_version_full=$(nix eval --impure --json --expr "with import ./. { config.allowAliases = false; }; nixVersions.stable.version" | jq -r)
1212+1313+# strip patch version
1414+stable_version_trimmed=${stable_version_full%.*}
1515+1116for name in $nix_versions; do
1217 minor_version=${name#nix_*_}
1318 if [[ "$name" = "nix_2_3" ]]; then # not maintained by the nix team
1419 continue
1520 fi
2121+ if [[ "$name" = "nix_${stable_version_trimmed//./_}" ]]; then
2222+ curl https://releases.nixos.org/nix/nix-$stable_version_full/fallback-paths.nix > "$NIXPKGS_DIR/nixos/modules/installer/tools/nix-fallback-paths.nix"
2323+ # nix-update will commit the file if it has changed
2424+ git add "$NIXPKGS_DIR/nixos/modules/installer/tools/nix-fallback-paths.nix"
2525+ fi
2626+1627 nix-update --override-filename "$SCRIPT_DIR/default.nix" --version-regex "(2\\.${minor_version}\..+)" --build --commit "nixVersions.$name"
1728done
1829