summary refs log tree commit diff
path: root/pkgs/lib/types.nix
diff options
context:
space:
mode:
authorMarc Weber <marco-oweber@gmx.de>2013-08-22 09:45:22 +0300
committerEvgeny Egorochkin <phreedom@yandex.ru>2013-08-22 09:45:22 +0300
commitfd803fce606a007403ba6d05f09ed2e6a3371830 (patch)
tree1623c8947df18ad74fb278f7bc30673c9739c35b /pkgs/lib/types.nix
parentb00d82493028c8d88a90359fa238454f0d978842 (diff)
downloadnixpkgs-fd803fce606a007403ba6d05f09ed2e6a3371830.tar
nixpkgs-fd803fce606a007403ba6d05f09ed2e6a3371830.tar.gz
nixpkgs-fd803fce606a007403ba6d05f09ed2e6a3371830.tar.bz2
nixpkgs-fd803fce606a007403ba6d05f09ed2e6a3371830.tar.lz
nixpkgs-fd803fce606a007403ba6d05f09ed2e6a3371830.tar.xz
nixpkgs-fd803fce606a007403ba6d05f09ed2e6a3371830.tar.zst
nixpkgs-fd803fce606a007403ba6d05f09ed2e6a3371830.zip
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 (8b2256686b4082f8ce6f8f61cba1eb6c1e786471).
Diffstat (limited to 'pkgs/lib/types.nix')
-rw-r--r--pkgs/lib/types.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/lib/types.nix b/pkgs/lib/types.nix
index f268580d783..b62c08f3af5 100644
--- a/pkgs/lib/types.nix
+++ b/pkgs/lib/types.nix
@@ -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;