mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
lib/options: Add showOptionWithDefLocs
This commit is contained in:
parent
a234fb2a5b
commit
89b4bd8b24
2 changed files with 8 additions and 1 deletions
|
@ -7,6 +7,7 @@ let
|
|||
collect
|
||||
concatLists
|
||||
concatMap
|
||||
concatMapStringsSep
|
||||
elemAt
|
||||
filter
|
||||
foldl'
|
||||
|
@ -340,6 +341,11 @@ rec {
|
|||
in "\n- In `${def.file}'${result}"
|
||||
) defs;
|
||||
|
||||
showOptionWithDefLocs = opt: ''
|
||||
${showOption opt.loc}, with values defined in:
|
||||
${concatMapStringsSep "\n" (defFile: " - ${defFile}") opt.files}
|
||||
'';
|
||||
|
||||
unknownModule = "<unknown-file>";
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue