modules: add mkPackageOptionMD

another transitional option factory, like mkAliasOptionModuleMD.
This commit is contained in:
pennae 2022-12-30 21:04:52 +01:00 committed by pennae
parent 4c1cfbdb84
commit 9da5f12ecf
23 changed files with 42 additions and 24 deletions

View file

@ -50,7 +50,7 @@ let
(name: value:
let
wholeName = "${namePrefix}.${name}";
guard = lib.warn "Attempt to evaluate package ${wholeName} in option documentation; this is not supported and will eventually be an error. Use `mkPackageOption` or `literalExpression` instead.";
guard = lib.warn "Attempt to evaluate package ${wholeName} in option documentation; this is not supported and will eventually be an error. Use `mkPackageOption{,MD}` or `literalExpression` instead.";
in if isAttrs value then
scrubDerivations wholeName value
// optionalAttrs (isDerivation value) {