mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
lib.types.uniq: Check inner type
We now reuse the `unique` type, which implements this. Keeping the duplication around would be bad at this point.
This commit is contained in:
parent
2b4a1a1d4f
commit
bd285d2c11
@ -613,18 +613,7 @@ rec {
|
|||||||
nestedTypes.elemType = elemType;
|
nestedTypes.elemType = elemType;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Value of given type but with no merging (i.e. `uniq list`s are not concatenated).
|
uniq = unique { message = ""; };
|
||||||
uniq = elemType: mkOptionType rec {
|
|
||||||
name = "uniq";
|
|
||||||
inherit (elemType) description descriptionClass check;
|
|
||||||
merge = mergeOneOption;
|
|
||||||
emptyValue = elemType.emptyValue;
|
|
||||||
getSubOptions = elemType.getSubOptions;
|
|
||||||
getSubModules = elemType.getSubModules;
|
|
||||||
substSubModules = m: uniq (elemType.substSubModules m);
|
|
||||||
functor = (defaultFunctor name) // { wrapped = elemType; };
|
|
||||||
nestedTypes.elemType = elemType;
|
|
||||||
};
|
|
||||||
|
|
||||||
unique = { message }: type: mkOptionType rec {
|
unique = { message }: type: mkOptionType rec {
|
||||||
name = "unique";
|
name = "unique";
|
||||||
|
Loading…
Reference in New Issue
Block a user