diff options
author | Silvan Mosberger <contact@infinisil.com> | 2019-07-29 20:49:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-29 20:49:33 +0200 |
commit | 377cd8a1eafddf860c9c39b6fa9444bff4e2db88 (patch) | |
tree | 17d9522d7108a8bb2c331784c8f291b1a0fbf8e3 /lib | |
parent | aaf2ecd801c3fed8a0e69bf1416710fde164ec1d (diff) | |
parent | 795383204e2a63a41ca38c6ca021a97c7f5d1775 (diff) |
Merge pull request #65380 from danbst/int-merge-one-option
lib/types: change merge strategy for `str`, `int`, `float`, `path` and `enum`
Diffstat (limited to 'lib')
-rw-r--r-- | lib/types.nix | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/types.nix b/lib/types.nix index b225119299da..e22bcd326c86 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -111,7 +111,7 @@ rec { name = "int"; description = "signed integer"; check = isInt; - merge = mergeOneOption; + merge = mergeEqualOption; }; # Specialized subdomains of int @@ -176,14 +176,14 @@ rec { name = "float"; description = "floating point number"; check = isFloat; - merge = mergeOneOption; + merge = mergeEqualOption; }; str = mkOptionType { name = "str"; description = "string"; check = isString; - merge = mergeOneOption; + merge = mergeEqualOption; }; strMatching = pattern: mkOptionType { @@ -243,7 +243,7 @@ rec { name = "path"; # Hacky: there is no ‘isPath’ primop. check = x: builtins.substring 0 1 (toString x) == "/"; - merge = mergeOneOption; + merge = mergeEqualOption; }; # drop this in the future: @@ -415,7 +415,7 @@ rec { name = "enum"; description = "one of ${concatMapStringsSep ", " show values}"; check = flip elem values; - merge = mergeOneOption; + merge = mergeEqualOption; functor = (defaultFunctor name) // { payload = values; binOp = a: b: unique (a ++ b); }; }; |