mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 19:55:41 +03:00
List should be an alias of listOf, and it should no longer be used.
Add deprecation notice to list.
Nixos has already been ported from list to listOf (8b2256686b
).
This commit is contained in:
parent
b00d824930
commit
fd803fce60
1 changed files with 4 additions and 2 deletions
|
@ -96,8 +96,10 @@ rec {
|
|||
check = lib.traceValIfNot (x: builtins.unsafeDiscardStringContext (builtins.substring 0 1 (toString x)) == "/");
|
||||
};
|
||||
|
||||
listOf = types.list;
|
||||
list = elemType: mkOptionType {
|
||||
# drop this in the future:
|
||||
list = builtins.trace "types.list is deprecated, use types.listOf instead" types.listOf;
|
||||
|
||||
listOf = elemType: mkOptionType {
|
||||
name = "list of ${elemType.name}s";
|
||||
check = value: lib.traceValIfNot isList value && all elemType.check value;
|
||||
merge = concatLists;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue