mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
attrsets: fix and add some doc types
This commit is contained in:
parent
d9c3fbfcdc
commit
5ff21bfc73
2 changed files with 38 additions and 27 deletions
|
@ -104,8 +104,6 @@ rec {
|
|||
/* Creates an Option attribute set for an option that specifies the
|
||||
package a module should use for some purpose.
|
||||
|
||||
Type: mkPackageOption :: pkgs -> string -> { default :: [string], example :: null | string | [string] } -> option
|
||||
|
||||
The package is specified as a list of strings representing its attribute path in nixpkgs.
|
||||
|
||||
Because of this, you need to pass nixpkgs itself as the first argument.
|
||||
|
@ -116,6 +114,8 @@ rec {
|
|||
|
||||
You can omit the default path if the name of the option is also attribute path in nixpkgs.
|
||||
|
||||
Type: mkPackageOption :: pkgs -> string -> { default :: [string], example :: null | string | [string] } -> option
|
||||
|
||||
Example:
|
||||
mkPackageOption pkgs "hello" { }
|
||||
=> { _type = "option"; default = «derivation /nix/store/3r2vg51hlxj3cx5vscp0vkv60bqxkaq0-hello-2.10.drv»; defaultText = { ... }; description = "The hello package to use."; type = { ... }; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue