core/lib/tests/modules/doRename-warnings.nix

29 lines
478 B
Nix
Raw Normal View History

2024-06-30 08:16:52 +00:00
{ lib, config, ... }:
{
2024-05-01 22:14:04 +00:00
imports = [
2024-06-30 08:16:52 +00:00
(lib.doRename {
from = [
"a"
"b"
];
to = [
"c"
"d"
"e"
];
warn = true;
use = x: x;
visible = true;
})
2024-05-01 22:14:04 +00:00
];
options = {
warnings = lib.mkOption { type = lib.types.listOf lib.types.str; };
2024-06-30 08:16:52 +00:00
c.d.e = lib.mkOption { };
result = lib.mkOption { };
2024-05-01 22:14:04 +00:00
};
config = {
a.b = 1234;
result = lib.concatStringsSep "%" config.warnings;
};
}