···136136 let default' = if !isList default then [ default ] else default;
137137 in mkOption {
138138 type = lib.types.package;
139139- description = lib.mdDoc "The ${name} package to use.";
139139+ description = "The ${name} package to use.";
140140 default = attrByPath default'
141141 (throw "${concatStringsSep "." default'} cannot be found in pkgs") pkgs;
142142 defaultText = literalExpression ("pkgs." + concatStringsSep "." default');
143143 ${if example != null then "example" else null} = literalExpression
144144 (if isList example then "pkgs." + concatStringsSep "." example else example);
145145 };
146146+147147+ /* Like mkPackageOption, but emit an mdDoc description instead of DocBook. */
148148+ mkPackageOptionMD = args: name: extra:
149149+ let option = mkPackageOption args name extra;
150150+ in option // { description = lib.mdDoc option.description; };
146151147152 /* This option accepts anything, but it does not produce any result.
148153
···8888}
8989```
90909191-### `mkPackageOption` {#sec-option-declarations-util-mkPackageOption}
9191+### `mkPackageOption`, `mkPackageOptionMD` {#sec-option-declarations-util-mkPackageOption}
92929393Usage:
9494···105105The second argument is the name of the option, used in the description "The \<name\> package to use.". You can also pass an example value, either a literal string or a package's attribute path.
106106107107You can omit the default path if the name of the option is also attribute path in nixpkgs.
108108+109109+During the transition to CommonMark documentation `mkPackageOption` creates an option with a DocBook description attribute, once the transition is completed it will create a CommonMark description instead. `mkPackageOptionMD` always creates an option with a CommonMark description attribute and will be removed some time after the transition is completed.
108110109111::: {#ex-options-declarations-util-mkPackageOption .title}
110112Examples:
···138138}
139139</programlisting>
140140 <section xml:id="sec-option-declarations-util-mkPackageOption">
141141- <title><literal>mkPackageOption</literal></title>
141141+ <title><literal>mkPackageOption</literal>,
142142+ <literal>mkPackageOptionMD</literal></title>
142143 <para>
143144 Usage:
144145 </para>
···171172 <para>
172173 You can omit the default path if the name of the option is
173174 also attribute path in nixpkgs.
175175+ </para>
176176+ <para>
177177+ During the transition to CommonMark documentation
178178+ <literal>mkPackageOption</literal> creates an option with a
179179+ DocBook description attribute, once the transition is
180180+ completed it will create a CommonMark description instead.
181181+ <literal>mkPackageOptionMD</literal> always creates an option
182182+ with a CommonMark description attribute and will be removed
183183+ some time after the transition is completed.
174184 </para>
175185 <anchor xml:id="ex-options-declarations-util-mkPackageOption" />
176186 <para>
···5050 (name: value:
5151 let
5252 wholeName = "${namePrefix}.${name}";
5353- guard = lib.warn "Attempt to evaluate package ${wholeName} in option documentation; this is not supported and will eventually be an error. Use `mkPackageOption` or `literalExpression` instead.";
5353+ guard = lib.warn "Attempt to evaluate package ${wholeName} in option documentation; this is not supported and will eventually be an error. Use `mkPackageOption{,MD}` or `literalExpression` instead.";
5454 in if isAttrs value then
5555 scrubDerivations wholeName value
5656 // optionalAttrs (isDerivation value) {
···3636 which execute configured commands for any person or service that knows the URL
3737 '');
38383939- package = mkPackageOption pkgs "webhook" {};
3939+ package = mkPackageOptionMD pkgs "webhook" {};
4040 user = mkOption {
4141 type = types.str;
4242 default = defaultUser;