From 1ffa30b0559a05e810a3db663da5066953d4f05a Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Mon, 6 Jun 2022 16:05:21 +0200 Subject: lib/modules: Fix meta duplication in shorthand syntax --- lib/tests/modules/shorthand-meta.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lib/tests/modules/shorthand-meta.nix (limited to 'lib/tests/modules') 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" ]; + } + ]; +} -- cgit 1.4.1