about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobert Hensing <roberth@users.noreply.github.com>2022-12-29 01:09:42 +0100
committerGitHub <noreply@github.com>2022-12-29 01:09:42 +0100
commit7d91ec68f883e8a576267deb830a63e88fade1d3 (patch)
tree1287a8633a9666d654d607813e73800b6029dcd8
parentbfdc69ecfbe7e8be3461288e2af5a40533958677 (diff)
parentef9b04ec5fe9bad204381e217ca150cec242e128 (diff)
Merge pull request #208171 from hercules-ci/revert-remove-loaOf
Revert "lib/types: remove loaOf"
-rw-r--r--lib/types.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/types.nix b/lib/types.nix
index e7e8a99e5743b..e741bec6c29de 100644
--- a/lib/types.nix
+++ b/lib/types.nix
@@ -558,6 +558,15 @@ rec {
       nestedTypes.elemType = elemType;
     };
 
+    # TODO: deprecate this in the future:
+    loaOf = elemType: types.attrsOf elemType // {
+      name = "loaOf";
+      deprecationMessage = "Mixing lists with attribute values is no longer"
+        + " possible; please use `types.attrsOf` instead. See"
+        + " https://github.com/NixOS/nixpkgs/issues/1800 for the motivation.";
+      nestedTypes.elemType = elemType;
+    };
+
     # Value of given type but with no merging (i.e. `uniq list`s are not concatenated).
     uniq = elemType: mkOptionType rec {
       name = "uniq";