mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-03 17:45:03 +02:00
Some plugins don't really play nicely with being launched in a headless sandboxed environment. This adds the pseudo option 'tests.dontRun' to avoid running those tests
25 lines
607 B
Nix
25 lines
607 B
Nix
{
|
|
makeNixvim,
|
|
pkgs,
|
|
} @ args: let
|
|
tests = import ./plugins {inherit (pkgs) lib;};
|
|
check = import ../lib/check.nix args;
|
|
checkConfig = check.checkNvim;
|
|
in
|
|
# We attempt to build & execute all configurations
|
|
builtins.mapAttrs (
|
|
name: config: let
|
|
testAttributes =
|
|
if builtins.hasAttr "tests" config
|
|
then config.tests
|
|
else {
|
|
dontRun = false;
|
|
};
|
|
nvim = makeNixvim (pkgs.lib.attrsets.filterAttrs (n: _: n != "tests") config);
|
|
in
|
|
checkConfig {
|
|
inherit name nvim;
|
|
inherit (testAttributes) dontRun;
|
|
}
|
|
)
|
|
tests
|