Skip to content

Commit f086ad5

Browse files
committed
flake-modules/tests: introduce callTest helper
Allows using the `callPackage` pattern on tests. Currently only used for the main `../tests` import.
1 parent 3aafb55 commit f086ad5

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

flake-modules/tests.nix

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
{ self, helpers, ... }:
1+
{
2+
self,
3+
lib,
4+
helpers,
5+
...
6+
}:
27
{
38
perSystem =
49
{
@@ -11,6 +16,19 @@
1116
}:
1217
let
1318
inherit (self'.legacyPackages) nixvimConfiguration;
19+
callTest = lib.callPackageWith (
20+
pkgs
21+
// {
22+
inherit
23+
helpers
24+
lib
25+
makeNixvimWithModule
26+
pkgsUnfree
27+
self
28+
system
29+
;
30+
}
31+
);
1432
in
1533
{
1634
checks = {
@@ -52,6 +70,6 @@
5270
package-options = pkgs.callPackage ../tests/package-options.nix { inherit nixvimConfiguration; };
5371

5472
lsp-all-servers = pkgs.callPackage ../tests/lsp-servers.nix { inherit nixvimConfiguration; };
55-
} // import ../tests { inherit pkgs pkgsUnfree helpers; };
73+
} // callTest ../tests { };
5674
};
5775
}

0 commit comments

Comments
 (0)