1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-08 19:46:06 +01:00

tests: move pkgsForTests definition to tests/default.nix

This commit is contained in:
Gaetan Lepage 2025-09-05 16:34:16 +02:00 committed by Matt Sturgeon
parent a04b93fa7b
commit dac1623067
2 changed files with 11 additions and 8 deletions

View file

@ -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;

View file

@ -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