nix: 2.18 -> 2.24 (#335342)

This commit is contained in:
Fabián Heredia Montiel 2024-09-17 15:34:47 -06:00 committed by GitHub
commit e25a409cef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 35 additions and 11 deletions

View file

@ -8,6 +8,14 @@
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`.

View file

@ -1,7 +1,8 @@
{
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";
}

View file

@ -2,18 +2,21 @@
stdenv.mkDerivation rec {
pname = "nix-plugins";
version = "14.0.0";
version = "15.0.0";
src = fetchFromGitHub {
owner = "shlevy";
repo = "nix-plugins";
rev = version;
hash = "sha256-RDKAuLwcZ3Pbn5JUDmGBcfD0xbM6Jud2ouXh/YKpfS8=";
hash = "sha256-C4VqKHi6nVAHuXVhqvTRRyn0Bb619ez4LzgUWPH1cbM=";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ nix boost ];
buildInputs = [
nix
boost
];
meta = {
description = "Collection of miscellaneous plugins for the nix expression language";

View file

@ -6,7 +6,7 @@
, nix
, pkg-config
# Whether to build the nix-doc plugin for Nix
, withPlugin ? true
, withPlugin ? false # no longer needed for nix 2.24
}:
let

View file

@ -85,7 +85,9 @@ in
# passthru tests
, pkgsi686Linux
, pkgsStatic
, runCommand
, pkgs
}: let
self = stdenv.mkDerivation {
pname = "nix";
@ -262,6 +264,8 @@ self = stdenv.mkDerivation {
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;
@ -281,6 +285,12 @@ self = stdenv.mkDerivation {
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;
};
};
};

View file

@ -115,7 +115,9 @@ let
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
# 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"
@ -239,7 +241,7 @@ in lib.makeExtensible (self: ({
else
nix;
stable = addFallbackPathsCheck self.nix_2_18;
stable = addFallbackPathsCheck self.nix_2_24;
} // lib.optionalAttrs config.allowAliases (
lib.listToAttrs (map (
minor: