mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 05:05:29 +03:00
modules: add mkAliasOptionModuleMD
mkAliasOptionModule should not default to mdDoc descriptions because that can break out-of-tree users of documentation infrastructure. add an explicitly-MD variant for now, to be removed some time after the MD transition is complete.
This commit is contained in:
parent
b2054d3f2d
commit
4c1cfbdb84
8 changed files with 26 additions and 14 deletions
|
@ -306,14 +306,16 @@ if hasDocBookErrors:
|
|||
print("Explanation: The documentation contains descriptions, examples, or defaults written in DocBook. " +
|
||||
"NixOS is in the process of migrating from DocBook to Markdown, and " +
|
||||
"DocBook is disallowed for in-tree modules. To change your contribution to "+
|
||||
"use Markdown, apply mdDoc and literalMD. For example:\n" +
|
||||
"use Markdown, apply mdDoc and literalMD and use the *MD variants of option creation " +
|
||||
"functions where they are available. For example:\n" +
|
||||
"\n" +
|
||||
" example.foo = mkOption {\n" +
|
||||
" description = lib.mdDoc ''your description'';\n" +
|
||||
" defaultText = lib.literalMD ''your description of default'';\n" +
|
||||
" }\n" +
|
||||
" };\n" +
|
||||
"\n" +
|
||||
" example.enable = mkEnableOption (lib.mdDoc ''your thing'');",
|
||||
" example.enable = mkEnableOption (lib.mdDoc ''your thing'');\n" +
|
||||
" imports = [ (mkAliasOptionModuleMD [ \"example\" \"args\" ] [ \"example\" \"settings\" ]) ];",
|
||||
file = sys.stderr)
|
||||
|
||||
if hasErrors:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue