Skip to content

Commit

Permalink
tests/nixpkgs-module: only import the minimal modules for test
Browse files Browse the repository at this point in the history
Instead of importing the full set of top-level nixvim modules, only
import the nixpkgs-module and its direct dependencies.
  • Loading branch information
MattSturgeon committed Jan 16, 2025
1 parent e13b2a5 commit d4c6776
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/nixpkgs-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,24 @@ 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;
runNvim = false;
runCommand = runCommandLocal;
};
}
../modules/misc
../modules/top-level/test.nix
../modules/top-level/nixpkgs.nix
];
};

Expand Down

0 comments on commit d4c6776

Please sign in to comment.