diff --git a/flake-modules/tests.nix b/flake-modules/tests.nix index 7e6789d4d8..d2ffacf779 100644 --- a/flake-modules/tests.nix +++ b/flake-modules/tests.nix @@ -10,42 +10,42 @@ ... }: { - checks = { - tests = import ../tests { - inherit - pkgs - pkgsUnfree - helpers - makeNixvimWithModule - ; - }; - - extra-args-tests = import ../tests/extra-args.nix { - inherit pkgs; - inherit makeNixvimWithModule; - }; + checks = + { + extra-args-tests = import ../tests/extra-args.nix { + inherit pkgs; + inherit makeNixvimWithModule; + }; - extend = import ../tests/extend.nix { inherit pkgs makeNixvimWithModule; }; + extend = import ../tests/extend.nix { inherit pkgs makeNixvimWithModule; }; - extra-files = import ../tests/extra-files.nix { inherit pkgs makeNixvimWithModule; }; + extra-files = import ../tests/extra-files.nix { inherit pkgs makeNixvimWithModule; }; - enable-except-in-tests = import ../tests/enable-except-in-tests.nix { - inherit pkgs makeNixvimWithModule; - inherit (self.lib.${system}.check) mkTestDerivationFromNixvimModule; - }; + enable-except-in-tests = import ../tests/enable-except-in-tests.nix { + inherit pkgs makeNixvimWithModule; + inherit (self.lib.${system}.check) mkTestDerivationFromNixvimModule; + }; - no-flake = import ../tests/no-flake.nix { - inherit system; - inherit (self.lib.${system}.check) mkTestDerivationFromNvim; - nixvim = "${self}"; - }; + no-flake = import ../tests/no-flake.nix { + inherit system; + inherit (self.lib.${system}.check) mkTestDerivationFromNvim; + nixvim = "${self}"; + }; - lib-tests = import ../tests/lib-tests.nix { - inherit pkgs helpers; - inherit (pkgs) lib; - }; + lib-tests = import ../tests/lib-tests.nix { + inherit pkgs helpers; + inherit (pkgs) lib; + }; - maintainers = import ../tests/maintainers.nix { inherit pkgs; }; - }; + maintainers = import ../tests/maintainers.nix { inherit pkgs; }; + } + // (import ../tests { + inherit + pkgs + pkgsUnfree + helpers + makeNixvimWithModule + ; + }); }; } diff --git a/tests/default.nix b/tests/default.nix index c19d9a9d75..f62849d07d 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -35,10 +35,12 @@ let } ]; }; - - # We attempt to build & execute all configurations - derivationList = builtins.map ( +in +# We attempt to build & execute all configurations +builtins.listToAttrs ( + builtins.map ( { name, cases }: + let # The test case can either be the actual definition, # or a child attr named `module`. @@ -47,7 +49,7 @@ let in { inherit name; - path = mkTestDerivationFromNixvimModule { + value = mkTestDerivationFromNixvimModule { inherit name; tests = builtins.map ( { name, case }: @@ -62,6 +64,5 @@ let pkgs = pkgsUnfree; }; } - ) (testFiles ++ [ exampleFiles ]); -in -pkgs.linkFarm "nixvim-tests" derivationList + ) (testFiles ++ [ exampleFiles ]) +)