mkRenamedOptionModule
lib.mkRenamedOptionModule
Docs pulled from | This Revision | about 1 hour ago
Return a module that causes a warning to be shown if the specified "from" option is defined; the defined value is however forwarded to the "to" option. This can be used to rename options while providing backward compatibility. For example,
mkRenamedOptionModule [ "boot" "copyKernels" ] [ "boot" "loader" "grub" "copyKernels" ]
forwards any definitions of boot.copyKernels to boot.loader.grub.copyKernels while printing a warning.
This also copies over the priority from the aliased option to the non-aliased option.
Inputs
from
-
1. Function argument
to
-
2. Function argument
Noogle detected
Implementation
The following is the current implementation of this function.
mkRenamedOptionModule = from: to: doRename {
inherit from to;
visible = false;
warn = true;
use = trace "Obsolete option `${showOption from}' is used. It was renamed to `${showOption to}'.";
};