mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 19:55:41 +03:00
nixos,nixpkgs: Add module classes
This allows modules that declare their class to be checked. While that's not most user modules, frameworks can take advantage of this by setting declaring the module class for their users. That way, the mistake of importing a module into the wrong hierarchy can be reported more clearly in some cases.
This commit is contained in:
parent
84b1b01702
commit
79703eef08
6 changed files with 14 additions and 3 deletions
|
@ -39,6 +39,7 @@ let
|
|||
_module.check = false;
|
||||
} ] ++ docModules.eager;
|
||||
specialArgs = specialArgs // {
|
||||
class = "nixos";
|
||||
pkgs = scrubDerivations "pkgs" pkgs;
|
||||
# allow access to arbitrary options for eager modules, eg for getting
|
||||
# option types from lazy modules
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue