diff options
author | hsjobeki <hsjobeki+github@gmail.com> | 2022-12-24 14:08:11 +0100 |
---|---|---|
committer | hsjobeki <hsjobeki+github@gmail.com> | 2022-12-24 14:08:11 +0100 |
commit | 5ff21bfc73f59efd3e61776964f7b7f1863a3136 (patch) | |
tree | 5305638a49e7dce3a49ff491e288df808842e660 /lib/options.nix | |
parent | d9c3fbfcdcffd2e6b8bf2f59cffcce5507c304b7 (diff) | |
download | nixlib-5ff21bfc73f59efd3e61776964f7b7f1863a3136.tar nixlib-5ff21bfc73f59efd3e61776964f7b7f1863a3136.tar.gz nixlib-5ff21bfc73f59efd3e61776964f7b7f1863a3136.tar.bz2 nixlib-5ff21bfc73f59efd3e61776964f7b7f1863a3136.tar.lz nixlib-5ff21bfc73f59efd3e61776964f7b7f1863a3136.tar.xz nixlib-5ff21bfc73f59efd3e61776964f7b7f1863a3136.tar.zst nixlib-5ff21bfc73f59efd3e61776964f7b7f1863a3136.zip |
attrsets: fix and add some doc types
Diffstat (limited to 'lib/options.nix')
-rw-r--r-- | lib/options.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/options.nix b/lib/options.nix index 0fd5b64a65d1..9425e803c056 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -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 = { ... }; } |