mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 19:55:41 +03:00
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:
parent
45a5c01a26
commit
df09c21fb2
7 changed files with 66 additions and 17 deletions
|
@ -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 ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue