mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +03:00
lib/modules: Document _module.args
Documents the _module.args option, motivated by many usages in Flakes,
especially with the deprecation of extraArgs
(78ada83361
)
The documentation rendering for this option had to be handled a bit
specially, since it's not declared in nixos/modules like all the other
NixOS options.
Co-Authored-By: pennae <github@quasiparticle.net>
Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
This commit is contained in:
parent
ec87404e71
commit
25de2935ef
3 changed files with 91 additions and 5 deletions
|
@ -48,7 +48,9 @@ overrides = pivot(json.load(open(sys.argv[2 + optOffset], 'r')))
|
|||
|
||||
# fix up declaration paths in lazy options, since we don't eval them from a full nixpkgs dir
|
||||
for (k, v) in options.items():
|
||||
v.value['declarations'] = list(map(lambda s: f'nixos/modules/{s}', v.value['declarations']))
|
||||
# The _module options are not declared in nixos/modules
|
||||
if v.value['loc'][0] != "_module":
|
||||
v.value['declarations'] = list(map(lambda s: f'nixos/modules/{s}', v.value['declarations']))
|
||||
|
||||
# merge both descriptions
|
||||
for (k, v) in overrides.items():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue