diff options
author | Ryan Mulligan <ryan@ryantm.com> | 2018-10-12 16:41:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-12 16:41:21 -0700 |
commit | 1bde5ec7e036501ae1e0fbd91e4e01af1dcd3a8b (patch) | |
tree | dd41440164b8b9cc742469d536f8ef69912a0ac4 /lib | |
parent | b27d39e04400d4cc7f4ae2b8cdfd7623c4449b75 (diff) | |
parent | 0808c7cd31aaa329aba21430b8b26c3a233dd83f (diff) | |
download | nixlib-1bde5ec7e036501ae1e0fbd91e4e01af1dcd3a8b.tar nixlib-1bde5ec7e036501ae1e0fbd91e4e01af1dcd3a8b.tar.gz nixlib-1bde5ec7e036501ae1e0fbd91e4e01af1dcd3a8b.tar.bz2 nixlib-1bde5ec7e036501ae1e0fbd91e4e01af1dcd3a8b.tar.lz nixlib-1bde5ec7e036501ae1e0fbd91e4e01af1dcd3a8b.tar.xz nixlib-1bde5ec7e036501ae1e0fbd91e4e01af1dcd3a8b.tar.zst nixlib-1bde5ec7e036501ae1e0fbd91e4e01af1dcd3a8b.zip |
Merge pull request #48251 from samueldr/feature/separated-string-description
lib/types: enhances separatedString's description.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/types.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/types.nix b/lib/types.nix index 4e44e7521c4b..ca6794e274c3 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -194,7 +194,10 @@ rec { # separator between the values). separatedString = sep: mkOptionType rec { name = "separatedString"; - description = "string"; + description = if sep == "" + then "Concatenated string" # for types.string. + else "strings concatenated with ${builtins.toJSON sep}" + ; check = isString; merge = loc: defs: concatStringsSep sep (getValues defs); functor = (defaultFunctor name) // { |