2023-03-01 00:39:55 +01:00
|
|
|
{
|
|
|
|
makeNixvim,
|
|
|
|
pkgs,
|
2023-03-03 09:18:52 +00:00
|
|
|
} @ args: let
|
2023-03-01 00:39:55 +01:00
|
|
|
tests = import ./plugins {inherit (pkgs) lib;};
|
2023-03-03 09:18:52 +00:00
|
|
|
check = import ../lib/check.nix args;
|
|
|
|
checkConfig = check.checkNvim;
|
2023-03-01 00:39:55 +01:00
|
|
|
in
|
|
|
|
# We attempt to build & execute all configurations
|
|
|
|
builtins.mapAttrs (
|
|
|
|
name: config: let
|
2023-03-16 09:13:43 +01:00
|
|
|
testAttributes =
|
|
|
|
if builtins.hasAttr "tests" config
|
|
|
|
then config.tests
|
|
|
|
else {
|
|
|
|
dontRun = false;
|
|
|
|
};
|
|
|
|
nvim = makeNixvim (pkgs.lib.attrsets.filterAttrs (n: _: n != "tests") config);
|
2023-03-01 00:39:55 +01:00
|
|
|
in
|
2023-03-16 09:13:43 +01:00
|
|
|
checkConfig {
|
|
|
|
inherit name nvim;
|
|
|
|
inherit (testAttributes) dontRun;
|
|
|
|
}
|
2023-03-01 00:39:55 +01:00
|
|
|
)
|
|
|
|
tests
|