summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpennae <github@quasiparticle.net>2022-08-28 21:44:38 +0200
committerpennae <github@quasiparticle.net>2022-08-30 15:05:05 +0200
commit9bb82c35b750b5ffdebb906b696b135ef028b4f6 (patch)
tree689701f01a3db4ed8b0f030ad5cbf5f36d00cc34
parentMerge pull request #188652 from r-ryantm/auto-update/difftastic (diff)
downloadnixpkgs-9bb82c35b750b5ffdebb906b696b135ef028b4f6.tar.gz
lib/options: add mdDoc support to mkEnableOption
-rw-r--r--lib/options.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/options.nix b/lib/options.nix
index 84d9fd5e15de..b6376796dbac 100644
--- a/lib/options.nix
+++ b/lib/options.nix
@@ -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;
};