2024-08-02 01:26:01 +01:00
|
|
|
{
|
|
|
|
lib,
|
2024-09-12 14:56:36 +01:00
|
|
|
self,
|
2024-08-02 01:26:01 +01:00
|
|
|
}:
|
|
|
|
rec {
|
|
|
|
# Build specialArgs for evaluating nixvim modules
|
|
|
|
specialArgsWith =
|
2024-09-12 14:56:36 +01:00
|
|
|
# TODO: switch defaultPkgs -> pkgsPath (i.e. pkgs.path or inputs.nixvim)
|
|
|
|
# FIXME: Ideally, we should not require callers to pass in _anything_ specific
|
|
|
|
{ defaultPkgs, ... }@extraSpecialArgs:
|
2024-08-02 01:26:01 +01:00
|
|
|
{
|
2024-09-12 14:56:36 +01:00
|
|
|
inherit lib defaultPkgs;
|
2024-08-02 01:26:01 +01:00
|
|
|
# TODO: deprecate `helpers`
|
2024-09-12 14:56:36 +01:00
|
|
|
helpers = self;
|
2024-08-02 01:26:01 +01:00
|
|
|
}
|
|
|
|
// extraSpecialArgs;
|
2024-08-04 21:54:17 +01:00
|
|
|
|
|
|
|
# Evaluate nixvim modules, checking warnings and assertions
|
|
|
|
evalNixvim =
|
|
|
|
{
|
|
|
|
modules ? [ ],
|
|
|
|
extraSpecialArgs ? { },
|
2024-09-24 07:02:22 +01:00
|
|
|
check ? null, # TODO: Remove stub
|
|
|
|
}@args:
|
|
|
|
# TODO: `check` argument removed 2024-09-24
|
|
|
|
# NOTE: this argument was always marked as experimental
|
|
|
|
assert lib.assertMsg (!args ? "check")
|
|
|
|
"`evalNixvim`: passing `check` is no longer supported. Checks are now done when evaluating `config.build.package` and can be avoided by using `config.build.packageUnchecked` instead.";
|
|
|
|
lib.evalModules {
|
|
|
|
modules = [ ../modules/top-level ] ++ modules;
|
|
|
|
specialArgs = specialArgsWith extraSpecialArgs;
|
|
|
|
};
|
2024-08-04 21:54:17 +01:00
|
|
|
|
2024-09-24 07:02:22 +01:00
|
|
|
# TODO: Removed 2024-09-24
|
|
|
|
getAssertionMessages = throw "`modules.getAssertionMessages` has been removed.";
|
2024-08-02 01:26:01 +01:00
|
|
|
}
|