From 5ff21bfc73f59efd3e61776964f7b7f1863a3136 Mon Sep 17 00:00:00 2001 From: hsjobeki Date: Sat, 24 Dec 2022 14:08:11 +0100 Subject: attrsets: fix and add some doc types --- lib/options.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/options.nix') diff --git a/lib/options.nix b/lib/options.nix index 0fd5b64a65d14..9425e803c0565 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 = { ... }; } -- cgit 1.4.1