Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

nixos/make-options-doc: deprecate docbook outputs

they're no longer necessary for us and will almost definitely start to
rot now (like commonmark and asciidoc outputs did previously). most
existing users seem to take the docbook output and run it through pandoc
to generate html, those can easily migrate to use commonmark instead.
other users will hopefully pipe up when they notice that things they rely
on are going away.

optionsUsedDocbook has only been around for one release and only exposed
to allow other places to generate warnings, so that does not deserve
such precautions.

pennae f52f531a d36f950d

+16 -31
+1 -1
nixos/doc/manual/default.nix
··· 198 ''; 199 200 in rec { 201 - inherit (optionsDoc) optionsJSON optionsNix optionsDocBook optionsUsedDocbook; 202 203 # Generate the NixOS manual. 204 manualHTML = runCommand "nixos-manual-html"
··· 198 ''; 199 200 in rec { 201 + inherit (optionsDoc) optionsJSON optionsNix optionsDocBook; 202 203 # Generate the NixOS manual. 204 manualHTML = runCommand "nixos-manual-html"
+15 -22
nixos/lib/make-options-doc/default.nix
··· 157 echo "file json-br $dst/options.json.br" >> $out/nix-support/hydra-build-products 158 ''; 159 160 - optionsUsedDocbook = pkgs.runCommand "options-used-docbook" {} '' 161 - if [ -e ${optionsJSON}/share/doc/nixos/.used-docbook ]; then 162 - echo 1 163 - else 164 - echo 0 165 - fi >"$out" 166 - ''; 167 - 168 - optionsDocBook = pkgs.runCommand "options-docbook.xml" { 169 - nativeBuildInputs = [ 170 - pkgs.nixos-render-docs 171 - ]; 172 - } '' 173 - nixos-render-docs -j $NIX_BUILD_CORES options docbook \ 174 - --manpage-urls ${pkgs.path + "/doc/manpage-urls.json"} \ 175 - --revision ${lib.escapeShellArg revision} \ 176 - --document-type ${lib.escapeShellArg documentType} \ 177 - --varlist-id ${lib.escapeShellArg variablelistId} \ 178 - --id-prefix ${lib.escapeShellArg optionIdPrefix} \ 179 - ${optionsJSON}/share/doc/nixos/options.json \ 180 - "$out" 181 - ''; 182 }
··· 157 echo "file json-br $dst/options.json.br" >> $out/nix-support/hydra-build-products 158 ''; 159 160 + optionsDocBook = lib.warn "optionsDocBook is deprecated since 23.11 and will be removed in 24.05" 161 + (pkgs.runCommand "options-docbook.xml" { 162 + nativeBuildInputs = [ 163 + pkgs.nixos-render-docs 164 + ]; 165 + } '' 166 + nixos-render-docs -j $NIX_BUILD_CORES options docbook \ 167 + --manpage-urls ${pkgs.path + "/doc/manpage-urls.json"} \ 168 + --revision ${lib.escapeShellArg revision} \ 169 + --document-type ${lib.escapeShellArg documentType} \ 170 + --varlist-id ${lib.escapeShellArg variablelistId} \ 171 + --id-prefix ${lib.escapeShellArg optionIdPrefix} \ 172 + ${optionsJSON}/share/doc/nixos/options.json \ 173 + "$out" 174 + ''); 175 }
-8
nixos/modules/misc/documentation.nix
··· 345 (mkIf cfg.nixos.enable { 346 system.build.manual = manual; 347 348 - system.activationScripts.check-manual-docbook = '' 349 - if [[ $(cat ${manual.optionsUsedDocbook}) = 1 ]]; then 350 - echo -e "\e[31;1mwarning\e[0m: This configuration contains option documentation in docbook." \ 351 - "Support for docbook is deprecated and will be removed after NixOS 23.05." \ 352 - "See nix-store --read-log ${builtins.unsafeDiscardStringContext manual.optionsJSON.drvPath}" 353 - fi 354 - ''; 355 - 356 environment.systemPackages = [] 357 ++ optional cfg.man.enable manual.manpages 358 ++ optionals cfg.doc.enable [ manual.manualHTML nixos-help ];
··· 345 (mkIf cfg.nixos.enable { 346 system.build.manual = manual; 347 348 environment.systemPackages = [] 349 ++ optional cfg.man.enable manual.manpages 350 ++ optionals cfg.doc.enable [ manual.manualHTML nixos-help ];