mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 13:15:30 +03:00
nixos/manual: no DocBook for mkPackageOption
`mkPackageOptionMD` is now an alias of `mkPackageOption`, and the transition from DocBook to CommonMark has been completed.
This commit is contained in:
parent
1af277b55e
commit
afb15c6513
1 changed files with 3 additions and 5 deletions
|
@ -90,7 +90,7 @@ lib.mkOption {
|
||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
|
|
||||||
### `mkPackageOption`, `mkPackageOptionMD` {#sec-option-declarations-util-mkPackageOption}
|
### `mkPackageOption` {#sec-option-declarations-util-mkPackageOption}
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
|
@ -121,15 +121,13 @@ valid attribute path in pkgs (if name is a list).
|
||||||
|
|
||||||
If you wish to explicitly provide no default, pass `null` as `default`.
|
If you wish to explicitly provide no default, pass `null` as `default`.
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
[]{#ex-options-declarations-util-mkPackageOption}
|
[]{#ex-options-declarations-util-mkPackageOption}
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
::: {#ex-options-declarations-util-mkPackageOption-hello .example}
|
::: {#ex-options-declarations-util-mkPackageOption-hello .example}
|
||||||
### Simple `mkPackageOption` usage
|
### Simple `mkPackageOption` usage
|
||||||
```nix
|
```nix
|
||||||
lib.mkPackageOptionMD pkgs "hello" { }
|
lib.mkPackageOption pkgs "hello" { }
|
||||||
# is like
|
# is like
|
||||||
lib.mkOption {
|
lib.mkOption {
|
||||||
type = lib.types.package;
|
type = lib.types.package;
|
||||||
|
@ -143,7 +141,7 @@ lib.mkOption {
|
||||||
::: {#ex-options-declarations-util-mkPackageOption-ghc .example}
|
::: {#ex-options-declarations-util-mkPackageOption-ghc .example}
|
||||||
### `mkPackageOption` with explicit default and example
|
### `mkPackageOption` with explicit default and example
|
||||||
```nix
|
```nix
|
||||||
lib.mkPackageOptionMD pkgs "GHC" {
|
lib.mkPackageOption pkgs "GHC" {
|
||||||
default = [ "ghc" ];
|
default = [ "ghc" ];
|
||||||
example = "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])";
|
example = "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue