diff options
Diffstat (limited to 'lib/tests/modules/shorthand-meta.nix')
-rw-r--r-- | lib/tests/modules/shorthand-meta.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/tests/modules/shorthand-meta.nix b/lib/tests/modules/shorthand-meta.nix new file mode 100644 index 00000000000..8c9619e18a2 --- /dev/null +++ b/lib/tests/modules/shorthand-meta.nix @@ -0,0 +1,19 @@ +{ lib, ... }: +let + inherit (lib) types mkOption; +in +{ + imports = [ + ({ config, ... }: { + options = { + meta.foo = mkOption { + type = types.listOf types.str; + }; + result = mkOption { default = lib.concatStringsSep " " config.meta.foo; }; + }; + }) + { + meta.foo = [ "one" "two" ]; + } + ]; +} |