From 5157fbaf2cd7eaaa5236801c2f4b409a6f5404df Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Wed, 10 Dec 2025 17:10:30 +0100 Subject: [PATCH] testWithNix: Don't depend on CppNix Change-Id: Ia0903d93796c30e370d99d02877cc93c258b8f32 --- flake.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 6d982b1f0..59d910cd1 100644 --- a/flake.nix +++ b/flake.nix @@ -465,7 +465,20 @@ let inherit (self.packages.${system}) nix; pkgs = nixpkgsFor.${system}.native; - testWithNix = import (nixpkgs + "/lib/tests/test-with-nix.nix") { inherit pkgs lib nix; }; + testWithNix = + (import (nixpkgs + "/lib/tests/test-with-nix.nix") { + inherit pkgs lib nix; + }).overrideAttrs + (_: { + buildInputs = [ + (import (nixpkgs + "/lib/path/tests") { + inherit pkgs; + # NOTE: Override the nix version used here, we cannot rely on CppNix actually building + # c.f. https://github.com/NixOS/nixpkgs/blob/master/lib/path/tests/default.nix#L18 + nixVersions.stable = nix; + }) + ]; + }); in pkgs.symlinkJoin { name = "nixpkgs-lib-tests";