From e8d61a25fcb5e11da8af0792da27a896bf87ba65 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 3 Nov 2021 19:19:41 +0100 Subject: lib/tests/modules: Test non-strictness some more Doesn't seem to have been a problem actually, but now it won't regress. --- lib/tests/modules/declare-attrsOf.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/tests/modules/declare-attrsOf.nix') diff --git a/lib/tests/modules/declare-attrsOf.nix b/lib/tests/modules/declare-attrsOf.nix index b3999de7e5f..d19964064b2 100644 --- a/lib/tests/modules/declare-attrsOf.nix +++ b/lib/tests/modules/declare-attrsOf.nix @@ -1,6 +1,13 @@ -{ lib, ... }: { +{ lib, ... }: +let + deathtrapArgs = lib.mapAttrs + (k: _: throw "The module system is too strict, accessing an unused option's ${k} mkOption-attribute.") + (lib.functionArgs lib.mkOption); +in +{ options.value = lib.mkOption { type = lib.types.attrsOf lib.types.str; default = {}; }; + options.testing-laziness-so-don't-read-me = lib.mkOption deathtrapArgs; } -- cgit 1.4.1