mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
nixos/make-options-doc: Support Nix-provided declaration locations
Feature was introduced in https://github.com/NixOS/nixpkgs/pull/174460, but wasn't supported in `mergeJSON.py` yet.
This commit is contained in:
parent
8bff3fef40
commit
7c81905344
@ -198,7 +198,7 @@ overrides = pivot(json.load(open(sys.argv[2 + optOffset], 'r')))
|
||||
for (k, v) in options.items():
|
||||
# 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']))
|
||||
v.value['declarations'] = list(map(lambda s: f'nixos/modules/{s}' if isinstance(s, str) else s, v.value['declarations']))
|
||||
|
||||
# merge both descriptions
|
||||
for (k, v) in overrides.items():
|
||||
|
Loading…
Reference in New Issue
Block a user