From 4584a58c0dfd965946be5b2f079f464ae0ee3632 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 16 Aug 2024 19:26:16 +0200 Subject: [PATCH 1/8] nix.stable.tests.nix-fallback-paths: Allow cross-compiled store path name Nix 2.24 has a riscv5-linux path that's cross-compiled e.g. nix-riscv64-unknown-linux-gnu-2.24.2 --- pkgs/tools/package-management/nix/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index 35edaf2bef46166..712055bfba29c33 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -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" From 2e702d07bbf4fc97d97a25a180431e826b38ac30 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 16 Aug 2024 19:28:06 +0200 Subject: [PATCH 2/8] nix: nix_2_18 -> nix_2_24 --- nixos/modules/installer/tools/nix-fallback-paths.nix | 11 ++++++----- pkgs/tools/package-management/nix/default.nix | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/nixos/modules/installer/tools/nix-fallback-paths.nix b/nixos/modules/installer/tools/nix-fallback-paths.nix index f9ea7eb395973f5..75ade3865833f6f 100644 --- a/nixos/modules/installer/tools/nix-fallback-paths.nix +++ b/nixos/modules/installer/tools/nix-fallback-paths.nix @@ -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/b9kk9p6ankg080wh70smhg44dyan78kn-nix-2.24.2"; + i686-linux = "/nix/store/nin0kajw977j8hhbyamgv5mkclssr03x-nix-2.24.2"; + aarch64-linux = "/nix/store/pghw4m535hnrwkdlm7bamxca6lbx6n7z-nix-2.24.2"; + riscv64-linux = "/nix/store/jcva3mcba7qn4waxkmv77w2r44q7wmq0-nix-riscv64-unknown-linux-gnu-2.24.2"; + x86_64-darwin = "/nix/store/fkvinbdryqr854hk9i9hpdcqqaqln39m-nix-2.24.2"; + aarch64-darwin = "/nix/store/z9j3va2vs4ycl9nxxph335c3jf47l27h-nix-2.24.2"; } diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index 712055bfba29c33..a5c4c03b3a09862 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -241,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: From 131b8e5fe6eafcc10d96e3d81d7a3841e099657f Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 17 Aug 2024 12:30:27 +0200 Subject: [PATCH 3/8] nixVersions.*: Add tests.nixpkgs-lib --- pkgs/tools/package-management/nix/common.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/tools/package-management/nix/common.nix b/pkgs/tools/package-management/nix/common.nix index 205cda250e217c4..7b512b9dcc391a9 100644 --- a/pkgs/tools/package-management/nix/common.nix +++ b/pkgs/tools/package-management/nix/common.nix @@ -86,6 +86,7 @@ in # passthru tests , pkgsi686Linux , runCommand +, pkgs }: let self = stdenv.mkDerivation { pname = "nix"; @@ -278,6 +279,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; + }; }; }; From 556d5d4789f3333c780c5734882452eed33e1376 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 17 Aug 2024 14:15:07 +0200 Subject: [PATCH 4/8] nixos/rl-2411: Add Nix update --- nixos/doc/manual/release-notes/rl-2411.section.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index a3042b88bf5ff00..c5f08a75035ec87 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -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`. From 12829a17fdadb32ec8351103c633bacdb0ed6fd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 17 Aug 2024 22:13:33 +0200 Subject: [PATCH 5/8] nix-doc: disable nix-doc --- pkgs/tools/package-management/nix-doc/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/package-management/nix-doc/default.nix b/pkgs/tools/package-management/nix-doc/default.nix index 53b05bccf3498c7..f7b3777f7f239f0 100644 --- a/pkgs/tools/package-management/nix-doc/default.nix +++ b/pkgs/tools/package-management/nix-doc/default.nix @@ -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 From 029116732305987878ffc9714829cc770e786a6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 17 Aug 2024 22:23:58 +0200 Subject: [PATCH 6/8] nix-plugins: 14.0.0 -> 15.0.0 Fixes build with newer Nix --- pkgs/development/libraries/nix-plugins/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/nix-plugins/default.nix b/pkgs/development/libraries/nix-plugins/default.nix index 8714c6b4037ad60..0da1d1d917f28b1 100644 --- a/pkgs/development/libraries/nix-plugins/default.nix +++ b/pkgs/development/libraries/nix-plugins/default.nix @@ -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"; From be83fcde7dae676ac077b352153a93af0df71d49 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 13 Sep 2024 12:12:01 +0200 Subject: [PATCH 7/8] nix.tests.nixStatic: init This formalizes lf-'s suggestion https://github.com/NixOS/nixpkgs/pull/335342#issuecomment-2294899692 > nixStatic should be a hard blocker [when updating Nix] --- pkgs/tools/package-management/nix/common.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/tools/package-management/nix/common.nix b/pkgs/tools/package-management/nix/common.nix index 7b512b9dcc391a9..0b8995f3060774f 100644 --- a/pkgs/tools/package-management/nix/common.nix +++ b/pkgs/tools/package-management/nix/common.nix @@ -85,6 +85,7 @@ in # passthru tests , pkgsi686Linux +, pkgsStatic , runCommand , pkgs }: let @@ -260,6 +261,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; From ac849e565872034155ccaaa0bf736a75f1073a6e Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 13 Sep 2024 13:37:46 +0200 Subject: [PATCH 8/8] nixos/nix-fallback-paths: 2.24.2 -> 2.24.6 --- nixos/modules/installer/tools/nix-fallback-paths.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nixos/modules/installer/tools/nix-fallback-paths.nix b/nixos/modules/installer/tools/nix-fallback-paths.nix index 75ade3865833f6f..10b2b5220e7512e 100644 --- a/nixos/modules/installer/tools/nix-fallback-paths.nix +++ b/nixos/modules/installer/tools/nix-fallback-paths.nix @@ -1,8 +1,8 @@ { - x86_64-linux = "/nix/store/b9kk9p6ankg080wh70smhg44dyan78kn-nix-2.24.2"; - i686-linux = "/nix/store/nin0kajw977j8hhbyamgv5mkclssr03x-nix-2.24.2"; - aarch64-linux = "/nix/store/pghw4m535hnrwkdlm7bamxca6lbx6n7z-nix-2.24.2"; - riscv64-linux = "/nix/store/jcva3mcba7qn4waxkmv77w2r44q7wmq0-nix-riscv64-unknown-linux-gnu-2.24.2"; - x86_64-darwin = "/nix/store/fkvinbdryqr854hk9i9hpdcqqaqln39m-nix-2.24.2"; - aarch64-darwin = "/nix/store/z9j3va2vs4ycl9nxxph335c3jf47l27h-nix-2.24.2"; + 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"; }