lib/options: Don't show internal suboption in the manual

Initially https://github.com/NixOS/nixpkgs/pull/82897 prevented
non-visible options from being rendered in the manual, but
visible-but-internal options were still being recursed into. This fixes
this, aligning the recurse condition here with the one in
make-options-doc/default.nix
This commit is contained in:
Silvan Mosberger 2020-09-02 00:40:27 +02:00
parent 51e63b550d
commit 0b61ed7af9
No known key found for this signature in database
GPG Key ID: E8F1E9EAD284E17D

View File

@ -192,7 +192,7 @@ rec {
let ss = opt.type.getSubOptions opt.loc;
in if ss != {} then optionAttrSetToDocList' opt.loc ss else [];
in
[ docOption ] ++ optionals docOption.visible subOptions) (collect isOption options);
[ docOption ] ++ optionals (docOption.visible && ! docOption.internal) subOptions) (collect isOption options);
/* This function recursively removes all derivation attributes from