From e51b8b9b5c91aa49981d78c4aa1ac08a50150103 Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Tue, 11 Jun 2024 01:29:06 +0100 Subject: [PATCH] lib/options: remove `defaultNullOpts.mkDesc` Leave a stub for now, which aborts with an error message. --- lib/options.nix | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/lib/options.nix b/lib/options.nix index 7fbf8a75..4b449d74 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -166,26 +166,8 @@ rec { // (optionalAttrs (args ? default) { pluginDefault = args.pluginDefault or args.default; }); in rec { - # TODO: deprecated in favor of `helpers.pluginDefaultText` - mkDesc = - default: desc: - let - defaultString = if isString default then default else generators.toPretty { } default; - defaultDesc = - "_Plugin default:_" - + ( - # Detect whether `default` is multiline or inline: - if hasInfix "\n" defaultString then "\n\n```nix\n${defaultString}\n```" else " `${defaultString}`" - ); - in - if desc == "" then - defaultDesc - else - '' - ${desc} - - ${defaultDesc} - ''; + # TODO: removed 2024-06-14; remove stub 2024-09-01 + mkDesc = abort "mkDesc has been removed. Use the `pluginDefault` argument or `helpers.pluginDefaultText`."; mkNullable' = args: mkNullOrOption' (convertArgs args); mkNullable =