nix: 2.18 -> 2.24 (#335342)

Changed files
+35 -11
nixos
doc
manual
release-notes
modules
installer
pkgs
development
libraries
nix-plugins
tools
package-management
+8
nixos/doc/manual/release-notes/rl-2411.section.md
···
Starting with release 25.05, the minimum supported version will be macOS Big Sur 11, and we cannot guarantee that packages will continue to work on older versions of macOS.
Users on old macOS versions should consider upgrading to a supported version (potentially using [OpenCore Legacy Patcher](https://dortania.github.io/OpenCore-Legacy-Patcher/) for old hardware) or installing NixOS.
If neither of those options are viable and you require new versions of software, [MacPorts](https://www.macports.org/) supports back to Mac OS X Snow Leopard 10.6.
- Convenience options for `amdgpu`, open source driver for Radeon cards, is now available under `hardware.amdgpu`.
···
Starting with release 25.05, the minimum supported version will be macOS Big Sur 11, and we cannot guarantee that packages will continue to work on older versions of macOS.
Users on old macOS versions should consider upgrading to a supported version (potentially using [OpenCore Legacy Patcher](https://dortania.github.io/OpenCore-Legacy-Patcher/) for old hardware) or installing NixOS.
If neither of those options are viable and you require new versions of software, [MacPorts](https://www.macports.org/) supports back to Mac OS X Snow Leopard 10.6.
+
- Nix was updated to 2.24, which brings a lot of improvements and fixes. See the release notes for
+
[2.19](https://nix.dev/manual/nix/latest/release-notes/rl-2.19),
+
[2.20](https://nix.dev/manual/nix/latest/release-notes/rl-2.20),
+
[2.21](https://nix.dev/manual/nix/latest/release-notes/rl-2.21),
+
[2.22](https://nix.dev/manual/nix/latest/release-notes/rl-2.22),
+
[2.23](https://nix.dev/manual/nix/latest/release-notes/rl-2.23),
+
[2.24](https://nix.dev/manual/nix/latest/release-notes/rl-2.24).
+
Notable changes include improvements to Git fetching, documentation comment support in `nix-repl> :doc`, as well as many quality of life improvements.
- Convenience options for `amdgpu`, open source driver for Radeon cards, is now available under `hardware.amdgpu`.
+6 -5
nixos/modules/installer/tools/nix-fallback-paths.nix
···
{
-
x86_64-linux = "/nix/store/f409bhlpp0xkzvdz95qr2yvfjfi8r9jc-nix-2.18.5";
-
i686-linux = "/nix/store/ra39jzrxq3bcpf55aahwv5037akvylf5-nix-2.18.5";
-
aarch64-linux = "/nix/store/xiw8a4jbnw18svgdb04hyqzg5bsjspqf-nix-2.18.5";
-
x86_64-darwin = "/nix/store/k2gzx7i90x3h2c8g6xdi1jkwbl6ic895-nix-2.18.5";
-
aarch64-darwin = "/nix/store/rqwymbndaqxma6p8s5brcl9k32n5xx54-nix-2.18.5";
}
···
{
+
x86_64-linux = "/nix/store/fmfy9zigxns8f1wfb4v2arf1jmfdjpjc-nix-2.24.6";
+
i686-linux = "/nix/store/bl95c09pcihf2fdqpzjyjk4bdq0bsizm-nix-2.24.6";
+
aarch64-linux = "/nix/store/2sbzgmvas19iq3nhg8xbnd8k0khahk34-nix-2.24.6";
+
riscv64-linux = "/nix/store/7yy1x9sx83wm77mjawd953d6a6wb669q-nix-riscv64-unknown-linux-gnu-2.24.6";
+
x86_64-darwin = "/nix/store/vs6bbxkwxqr828q8rj1xlbmsbnx1ry6z-nix-2.24.6";
+
aarch64-darwin = "/nix/store/d88r5b1qv1fvz2j9qndz8sr31mqgz45x-nix-2.24.6";
}
+6 -3
pkgs/development/libraries/nix-plugins/default.nix
···
stdenv.mkDerivation rec {
pname = "nix-plugins";
-
version = "14.0.0";
src = fetchFromGitHub {
owner = "shlevy";
repo = "nix-plugins";
rev = version;
-
hash = "sha256-RDKAuLwcZ3Pbn5JUDmGBcfD0xbM6Jud2ouXh/YKpfS8=";
};
nativeBuildInputs = [ cmake pkg-config ];
-
buildInputs = [ nix boost ];
meta = {
description = "Collection of miscellaneous plugins for the nix expression language";
···
stdenv.mkDerivation rec {
pname = "nix-plugins";
+
version = "15.0.0";
src = fetchFromGitHub {
owner = "shlevy";
repo = "nix-plugins";
rev = version;
+
hash = "sha256-C4VqKHi6nVAHuXVhqvTRRyn0Bb619ez4LzgUWPH1cbM=";
};
nativeBuildInputs = [ cmake pkg-config ];
+
buildInputs = [
+
nix
+
boost
+
];
meta = {
description = "Collection of miscellaneous plugins for the nix expression language";
+1 -1
pkgs/tools/package-management/nix-doc/default.nix
···
, nix
, pkg-config
# Whether to build the nix-doc plugin for Nix
-
, withPlugin ? true
}:
let
···
, nix
, pkg-config
# Whether to build the nix-doc plugin for Nix
+
, withPlugin ? false # no longer needed for nix 2.24
}:
let
+10
pkgs/tools/package-management/nix/common.nix
···
# passthru tests
, pkgsi686Linux
, runCommand
}: let
self = stdenv.mkDerivation {
pname = "nix";
···
tests = {
nixi686 = pkgsi686Linux.nixVersions.${self_attribute_name};
# Basic smoke test that needs to pass when upgrading nix.
# Note that this test does only test the nixVersions.stable attribute.
misc = nixosTests.nix-misc.default;
···
fi
touch $out
'';
};
};
···
# passthru tests
, pkgsi686Linux
+
, pkgsStatic
, runCommand
+
, pkgs
}: let
self = stdenv.mkDerivation {
pname = "nix";
···
tests = {
nixi686 = pkgsi686Linux.nixVersions.${self_attribute_name};
+
nixStatic = pkgsStatic.nixVersions.${self_attribute_name};
+
# Basic smoke test that needs to pass when upgrading nix.
# Note that this test does only test the nixVersions.stable attribute.
misc = nixosTests.nix-misc.default;
···
fi
touch $out
'';
+
+
/** Intended to test `lib`, but also a good smoke test for Nix */
+
nixpkgs-lib = import ../../../../lib/tests/test-with-nix.nix {
+
inherit lib pkgs;
+
nix = self;
+
};
};
};
+4 -2
pkgs/tools/package-management/nix/default.nix
···
runCommand "test-nix-fallback-paths-version-equals-nix-stable" {
paths = lib.concatStringsSep "\n" (builtins.attrValues (import ../../../../nixos/modules/installer/tools/nix-fallback-paths.nix));
} ''
-
if [[ "" != $(grep -v 'nix-${pkg.version}$' <<< "$paths") ]]; then
echo "nix-fallback-paths not up to date with nixVersions.stable (nix-${pkg.version})"
echo "The following paths are not up to date:"
grep -v 'nix-${pkg.version}$' <<< "$paths"
···
else
nix;
-
stable = addFallbackPathsCheck self.nix_2_18;
} // lib.optionalAttrs config.allowAliases (
lib.listToAttrs (map (
minor:
···
runCommand "test-nix-fallback-paths-version-equals-nix-stable" {
paths = lib.concatStringsSep "\n" (builtins.attrValues (import ../../../../nixos/modules/installer/tools/nix-fallback-paths.nix));
} ''
+
# NOTE: name may contain cross compilation details between the pname
+
# and version this is permitted thanks to ([^-]*-)*
+
if [[ "" != $(grep -vE 'nix-([^-]*-)*${lib.strings.replaceStrings ["."] ["\\."] pkg.version}$' <<< "$paths") ]]; then
echo "nix-fallback-paths not up to date with nixVersions.stable (nix-${pkg.version})"
echo "The following paths are not up to date:"
grep -v 'nix-${pkg.version}$' <<< "$paths"
···
else
nix;
+
stable = addFallbackPathsCheck self.nix_2_24;
} // lib.optionalAttrs config.allowAliases (
lib.listToAttrs (map (
minor: