lib/options: deprecate docbook text and literalDocBook

deprecate literalDocBook by adding a warning (that will not fire yet) to
its uses and other docbook literal strings by adding optional warning
message to mergeJSON.
This commit is contained in:
pennae
2022-09-01 19:23:59 +02:00
committed by pennae
parent 8c309aa43a
commit 767485a0de
9 changed files with 118 additions and 45 deletions

View File

@@ -6,6 +6,7 @@
, extraSources ? []
, baseOptionsJSON ? null
, warningsAreErrors ? true
, allowDocBook ? true
, prefix ? ../../..
}:
@@ -28,7 +29,7 @@ let
stripAnyPrefixes = lib.flip (lib.foldr lib.removePrefix) prefixesToStrip;
optionsDoc = buildPackages.nixosOptionsDoc {
inherit options revision baseOptionsJSON warningsAreErrors;
inherit options revision baseOptionsJSON warningsAreErrors allowDocBook;
transformOptions = opt: opt // {
# Clean up declaration sites to not refer to the NixOS source tree.
declarations = map stripAnyPrefixes opt.declarations;