mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
lib/modules: Deprecate args and check
This commit is contained in:
parent
78ada83361
commit
260b941dd0
@ -101,6 +101,11 @@ rec {
|
||||
check ? true
|
||||
}:
|
||||
let
|
||||
withWarnings = x:
|
||||
lib.warnIf (evalModulesArgs?args) "The args argument to evalModules is deprecated. Please set config._module.args instead."
|
||||
lib.warnIf (evalModulesArgs?check) "The check argument to evalModules is deprecated. Please set config._module.check instead."
|
||||
x;
|
||||
|
||||
legacyModules =
|
||||
optional (evalModulesArgs?args) {
|
||||
config = {
|
||||
@ -248,7 +253,7 @@ rec {
|
||||
inherit modules specialArgs;
|
||||
};
|
||||
|
||||
result = {
|
||||
result = withWarnings {
|
||||
options = checked options;
|
||||
config = checked (removeAttrs config [ "_module" ]);
|
||||
_module = checked (config._module);
|
||||
|
Loading…
Reference in New Issue
Block a user