tests/nixpkgs-module: only import the minimal modules for test

Instead of importing the full set of top-level nixvim modules, only
import the nixpkgs-module and its direct dependencies.
This commit is contained in:
Matt Sturgeon 2025-01-16 02:53:27 +00:00
parent e13b2a5129
commit d4c67764a7
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299

View file

@ -10,11 +10,14 @@ let
defaultPkgs = pkgs;
# Only imports the bare minimum modules, to ensure we are not accidentally evaluating `pkgs.*`
evalModule =
name: module:
lib.nixvim.modules.evalNixvim {
lib.evalModules {
modules = lib.toList module ++ [
{
_module.check = false;
flake = self;
test = {
inherit name;
buildNixvim = false;
@ -22,6 +25,9 @@ let
runCommand = runCommandLocal;
};
}
../modules/misc
../modules/top-level/test.nix
../modules/top-level/nixpkgs.nix
];
};