core/lib/tests/modules/doRename-warnings.nix
2024-06-30 09:12:46 +01:00

29 lines
478 B
Nix

{ lib, config, ... }:
{
imports = [
(lib.doRename {
from = [
"a"
"b"
];
to = [
"c"
"d"
"e"
];
warn = true;
use = x: x;
visible = true;
})
];
options = {
warnings = lib.mkOption { type = lib.types.listOf lib.types.str; };
c.d.e = lib.mkOption { };
result = lib.mkOption { };
};
config = {
a.b = 1234;
result = lib.concatStringsSep "%" config.warnings;
};
}