|
8 | 8 | self, # The flake instance |
9 | 9 | }: |
10 | 10 | let |
11 | | - inherit (self.legacyPackages.${system}) nixvimConfiguration; |
| 11 | + autoArgs = pkgs // { |
| 12 | + inherit |
| 13 | + helpers |
| 14 | + lib |
| 15 | + makeNixvimWithModule |
| 16 | + pkgsUnfree |
| 17 | + self |
| 18 | + system |
| 19 | + ; |
| 20 | + inherit (self.legacyPackages.${system}) nixvimConfiguration; |
| 21 | + inherit (self.lib.${system}.check) |
| 22 | + mkTestDerivationFromNvim |
| 23 | + mkTestDerivationFromNixvimModule |
| 24 | + ; |
| 25 | + # Recursive: |
| 26 | + inherit callTest callTests; |
| 27 | + }; |
| 28 | + |
| 29 | + callTest = lib.callPackageWith autoArgs; |
| 30 | + callTests = lib.callPackagesWith autoArgs; |
12 | 31 | in |
13 | 32 | { |
14 | | - extra-args-tests = import ./extra-args.nix { |
15 | | - inherit pkgs; |
16 | | - inherit makeNixvimWithModule; |
17 | | - }; |
18 | | - extend = import ./extend.nix { inherit pkgs makeNixvimWithModule; }; |
19 | | - extra-files = import ./extra-files.nix { inherit pkgs makeNixvimWithModule; }; |
20 | | - enable-except-in-tests = import ./enable-except-in-tests.nix { |
21 | | - inherit pkgs makeNixvimWithModule; |
22 | | - inherit (self.lib.${system}.check) mkTestDerivationFromNixvimModule; |
23 | | - }; |
24 | | - failing-tests = pkgs.callPackage ./failing-tests.nix { |
25 | | - inherit (self.lib.${system}.check) mkTestDerivationFromNixvimModule; |
26 | | - }; |
27 | | - no-flake = import ./no-flake.nix { |
28 | | - inherit system; |
29 | | - inherit (self.lib.${system}.check) mkTestDerivationFromNvim; |
30 | | - nixvim = "${self}"; |
31 | | - }; |
32 | | - lib-tests = import ./lib-tests.nix { |
33 | | - inherit pkgs helpers; |
34 | | - inherit (pkgs) lib; |
35 | | - }; |
36 | | - maintainers = import ./maintainers.nix { inherit pkgs; }; |
37 | | - plugins-by-name = pkgs.callPackage ./plugins-by-name.nix { inherit nixvimConfiguration; }; |
38 | | - generated = pkgs.callPackage ./generated.nix { }; |
39 | | - package-options = pkgs.callPackage ./package-options.nix { inherit nixvimConfiguration; }; |
40 | | - lsp-all-servers = pkgs.callPackage ./lsp-servers.nix { inherit nixvimConfiguration; }; |
| 33 | + extra-args-tests = callTest ./extra-args.nix { }; |
| 34 | + extend = callTest ./extend.nix { }; |
| 35 | + extra-files = callTest ./extra-files.nix { }; |
| 36 | + enable-except-in-tests = callTest ./enable-except-in-tests.nix { }; |
| 37 | + failing-tests = callTest ./failing-tests.nix { }; |
| 38 | + no-flake = callTest ./no-flake.nix { }; |
| 39 | + lib-tests = callTest ./lib-tests.nix { }; |
| 40 | + maintainers = callTest ./maintainers.nix { }; |
| 41 | + plugins-by-name = callTest ./plugins-by-name.nix { }; |
| 42 | + generated = callTest ./generated.nix { }; |
| 43 | + package-options = callTest ./package-options.nix { }; |
| 44 | + lsp-all-servers = callTest ./lsp-servers.nix { }; |
41 | 45 | } |
42 | 46 | # Tests generated from ./test-sources |
43 | 47 | # Grouped as a number of link-farms in the form { test-1, test-2, ... test-N } |
44 | | -// import ./main.nix { |
45 | | - inherit |
46 | | - lib |
47 | | - pkgs |
48 | | - pkgsUnfree |
49 | | - helpers |
50 | | - ; |
51 | | -} |
| 48 | +// callTests ./main.nix { } |
0 commit comments