summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorRyan Mulligan <ryan@ryantm.com>2018-10-12 16:41:21 -0700
committerGitHub <noreply@github.com>2018-10-12 16:41:21 -0700
commit1bde5ec7e036501ae1e0fbd91e4e01af1dcd3a8b (patch)
treedd41440164b8b9cc742469d536f8ef69912a0ac4 /lib
parentb27d39e04400d4cc7f4ae2b8cdfd7623c4449b75 (diff)
parent0808c7cd31aaa329aba21430b8b26c3a233dd83f (diff)
downloadnixlib-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.nix5
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) // {