query
On this page

separatedString

lib.types.separatedString

Docs pulled from | This Revision | 30 days ago


separator between the values).


Noogle detected

Implementation

The following is the current implementation of this function.

separatedString =
    sep:
    mkOptionType rec {
      name = "separatedString";
      description = "strings concatenated with ${builtins.toJSON sep}";
      descriptionClass = "noun";
      check = isString;
      merge = loc: defs: concatStringsSep sep (getValues defs);
      functor = (defaultFunctor name) // {
        payload = { inherit sep; };
        type = payload: lib.types.separatedString payload.sep;
        binOp = lhs: rhs: if lhs.sep == rhs.sep then { inherit (lhs) sep; } else null;
      };
    };