about summary refs log tree commit diff
path: root/nixpkgs/lib/tests/modules/types-anything/functions.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/lib/tests/modules/types-anything/functions.nix')
-rw-r--r--nixpkgs/lib/tests/modules/types-anything/functions.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/nixpkgs/lib/tests/modules/types-anything/functions.nix b/nixpkgs/lib/tests/modules/types-anything/functions.nix
index 079518913918..21edd4aff9c4 100644
--- a/nixpkgs/lib/tests/modules/types-anything/functions.nix
+++ b/nixpkgs/lib/tests/modules/types-anything/functions.nix
@@ -1,16 +1,22 @@
-{ lib, ... }: {
+{ lib, config, ... }: {
 
   options.value = lib.mkOption {
     type = lib.types.anything;
   };
 
+  options.applied = lib.mkOption {
+    default = lib.mapAttrs (name: fun: fun null) config.value;
+  };
+
   config = lib.mkMerge [
     {
       value.single-lambda = x: x;
-      value.multiple-lambdas = x: x;
+      value.multiple-lambdas = x: { inherit x; };
+      value.merging-lambdas = x: { inherit x; };
     }
     {
-      value.multiple-lambdas = x: x;
+      value.multiple-lambdas = x: [ x ];
+      value.merging-lambdas = y: { inherit y; };
     }
   ];