mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 18:32:23 +08:00
lib/options: add mdDoc support to mkEnableOption
This commit is contained in:
@@ -95,7 +95,10 @@ rec {
|
||||
name: mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether to enable ${name}.";
|
||||
description =
|
||||
if name ? _type && name._type == "mdDoc"
|
||||
then lib.mdDoc "Whether to enable ${name.text}."
|
||||
else "Whether to enable ${name}.";
|
||||
type = lib.types.bool;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user