nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

Merge pull request #201187 from pennae/mddoc-in-manual

nixos/manual: re-add mention of mdDoc marker

authored by

Robert Hensing and committed by
GitHub
a82e6b5d 833f9d5e

+16 -13
+7 -6
nixos/doc/manual/development/option-declarations.section.md
··· 11 11 type = type specification; 12 12 default = default value; 13 13 example = example value; 14 - description = "Description for use in the NixOS manual."; 14 + description = lib.mdDoc "Description for use in the NixOS manual."; 15 15 }; 16 16 }; 17 17 ``` ··· 59 59 : A textual description of the option, in [Nixpkgs-flavored Markdown]( 60 60 https://nixos.org/nixpkgs/manual/#sec-contributing-markup) format, that will be 61 61 included in the NixOS manual. During the migration process from DocBook 62 - to CommonMark the description may also be written in DocBook, but this is 63 - discouraged. 62 + it is necessary to mark descriptions written in CommonMark with `lib.mdDoc`. 63 + The description may still be written in DocBook (without any marker), but this 64 + is discouraged and will be deprecated in the future. 64 65 65 66 ## Utility functions for common option patterns {#sec-option-declarations-util} 66 67 ··· 84 83 type = lib.types.bool; 85 84 default = false; 86 85 example = true; 87 - description = "Whether to enable magic."; 86 + description = lib.mdDoc "Whether to enable magic."; 88 87 } 89 88 ``` 90 89 ··· 117 116 type = lib.types.package; 118 117 default = pkgs.hello; 119 118 defaultText = lib.literalExpression "pkgs.hello"; 120 - description = "The hello package to use."; 119 + description = lib.mdDoc "The hello package to use."; 121 120 } 122 121 ``` 123 122 ··· 133 132 default = pkgs.ghc; 134 133 defaultText = lib.literalExpression "pkgs.ghc"; 135 134 example = lib.literalExpression "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])"; 136 - description = "The GHC package to use."; 135 + description = lib.mdDoc "The GHC package to use."; 137 136 } 138 137 ``` 139 138
+9 -7
nixos/doc/manual/from_md/development/option-declarations.section.xml
··· 12 12 type = type specification; 13 13 default = default value; 14 14 example = example value; 15 - description = &quot;Description for use in the NixOS manual.&quot;; 15 + description = lib.mdDoc &quot;Description for use in the NixOS manual.&quot;; 16 16 }; 17 17 }; 18 18 </programlisting> ··· 98 98 A textual description of the option, in 99 99 <link xlink:href="https://nixos.org/nixpkgs/manual/#sec-contributing-markup">Nixpkgs-flavored 100 100 Markdown</link> format, that will be included in the NixOS 101 - manual. During the migration process from DocBook to 102 - CommonMark the description may also be written in DocBook, but 103 - this is discouraged. 101 + manual. During the migration process from DocBook it is 102 + necessary to mark descriptions written in CommonMark with 103 + <literal>lib.mdDoc</literal>. The description may still be 104 + written in DocBook (without any marker), but this is 105 + discouraged and will be deprecated in the future. 104 106 </para> 105 107 </listitem> 106 108 </varlistentry> ··· 134 132 type = lib.types.bool; 135 133 default = false; 136 134 example = true; 137 - description = &quot;Whether to enable magic.&quot;; 135 + description = lib.mdDoc &quot;Whether to enable magic.&quot;; 138 136 } 139 137 </programlisting> 140 138 <section xml:id="sec-option-declarations-util-mkPackageOption"> ··· 184 182 type = lib.types.package; 185 183 default = pkgs.hello; 186 184 defaultText = lib.literalExpression &quot;pkgs.hello&quot;; 187 - description = &quot;The hello package to use.&quot;; 185 + description = lib.mdDoc &quot;The hello package to use.&quot;; 188 186 } 189 187 </programlisting> 190 188 <anchor xml:id="ex-options-declarations-util-mkPackageOption-ghc" /> ··· 199 197 default = pkgs.ghc; 200 198 defaultText = lib.literalExpression &quot;pkgs.ghc&quot;; 201 199 example = lib.literalExpression &quot;pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])&quot;; 202 - description = &quot;The GHC package to use.&quot;; 200 + description = lib.mdDoc &quot;The GHC package to use.&quot;; 203 201 } 204 202 </programlisting> 205 203 <section xml:id="sec-option-declarations-eot">