nixos/documentation: deprecate docbook option docs
following the plan in https://github.com/NixOS/nixpkgs/pull/189318#discussion_r961764451 also adds an activation script to print the warning during activation instead of during build, otherwise folks using the new CLI that hides build logs by default might never see the warning.
This commit is contained in:
@@ -357,6 +357,14 @@ in
|
||||
(mkIf cfg.nixos.enable {
|
||||
system.build.manual = manual;
|
||||
|
||||
system.activationScripts.check-manual-docbook = ''
|
||||
if [[ $(cat ${manual.optionsUsedDocbook}) = 1 ]]; then
|
||||
echo -e "\e[31;1mwarning\e[0m: This configuration contains option documentation in docbook." \
|
||||
"Support for docbook is deprecated and will be removed after NixOS 23.05." \
|
||||
"See nix-store --read-log ${builtins.unsafeDiscardStringContext manual.optionsJSON.drvPath}"
|
||||
fi
|
||||
'';
|
||||
|
||||
environment.systemPackages = []
|
||||
++ optional cfg.man.enable manual.manpages
|
||||
++ optionals cfg.doc.enable [ manual.manualHTML nixos-help ];
|
||||
|
||||
Reference in New Issue
Block a user