lib/options: remove defaultNullOpts.mkDesc

Leave a stub for now, which aborts with an error message.
This commit is contained in:
Matt Sturgeon 2024-06-11 01:29:06 +01:00
parent 6e979dbe94
commit e51b8b9b5c
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299

View file

@ -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 =