diff options
author | Robert Hensing <robert@roberthensing.nl> | 2022-06-06 16:05:21 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2022-09-21 10:55:11 +0100 |
commit | 1ffa30b0559a05e810a3db663da5066953d4f05a (patch) | |
tree | 201ad912353ca43e6e7d57d36d4c7861481e105a /lib/tests/modules | |
parent | fce8b018f06431e7684b725a520416ff3862db9f (diff) | |
download | nixpkgs-1ffa30b0559a05e810a3db663da5066953d4f05a.tar nixpkgs-1ffa30b0559a05e810a3db663da5066953d4f05a.tar.gz nixpkgs-1ffa30b0559a05e810a3db663da5066953d4f05a.tar.bz2 nixpkgs-1ffa30b0559a05e810a3db663da5066953d4f05a.tar.lz nixpkgs-1ffa30b0559a05e810a3db663da5066953d4f05a.tar.xz nixpkgs-1ffa30b0559a05e810a3db663da5066953d4f05a.tar.zst nixpkgs-1ffa30b0559a05e810a3db663da5066953d4f05a.zip |
lib/modules: Fix meta duplication in shorthand syntax
Diffstat (limited to 'lib/tests/modules')
-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" ]; + } + ]; +} |