diff --git a/tests/default.nix b/tests/default.nix index 3f40862a..bbc672ca 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -7,7 +7,15 @@ system ? pkgs.stdenv.hostPlatform.system, }: let - autoArgs = pkgs // { + + # Use a single common instance of nixpkgs, with allowUnfree + # Having a single shared instance should speed up tests a little + pkgsForTest = import self.inputs.nixpkgs { + inherit system; + config.allowUnfree = true; + }; + + autoArgs = pkgsForTest // { inherit helpers self @@ -25,6 +33,7 @@ let ; # Recursive: inherit callTest callTests; + inherit pkgsForTest; }; callTest = lib.callPackageWith autoArgs; diff --git a/tests/main.nix b/tests/main.nix index 0a69c0fe..3403a285 100644 --- a/tests/main.nix +++ b/tests/main.nix @@ -6,17 +6,11 @@ pkgs, self, system, + pkgsForTest, }: let fetchTests = callTest ./fetch-tests.nix { }; - # Use a single common instance of nixpkgs, with allowUnfree - # Having a single shared instance should speed up tests a little - pkgsForTest = import self.inputs.nixpkgs { - inherit system; - config.allowUnfree = true; - }; - moduleToTest = file: name: module: let