summary refs log tree commit diff
path: root/lib/tests/modules
diff options
context:
space:
mode:
authorNicolas B. Pierron <nicolas.b.pierron@gmail.com>2015-05-13 22:44:04 +0200
committerNicolas B. Pierron <nicolas.b.pierron@gmail.com>2015-07-14 15:07:54 +0200
commita6b455bbaecb42679e5d1ade51433d62ee21bd03 (patch)
tree7420ee8b005df891693d1fdfc49f1084c611d936 /lib/tests/modules
parent2fa88f65eab650de535df838ae8cd0d633fa6aad (diff)
downloadnixpkgs-a6b455bbaecb42679e5d1ade51433d62ee21bd03.tar
nixpkgs-a6b455bbaecb42679e5d1ade51433d62ee21bd03.tar.gz
nixpkgs-a6b455bbaecb42679e5d1ade51433d62ee21bd03.tar.bz2
nixpkgs-a6b455bbaecb42679e5d1ade51433d62ee21bd03.tar.lz
nixpkgs-a6b455bbaecb42679e5d1ade51433d62ee21bd03.tar.xz
nixpkgs-a6b455bbaecb42679e5d1ade51433d62ee21bd03.tar.zst
nixpkgs-a6b455bbaecb42679e5d1ade51433d62ee21bd03.zip
NixOS modules: Add error context on module arguments evaluation.
Diffstat (limited to 'lib/tests/modules')
-rw-r--r--lib/tests/modules/define-_module-args-custom.nix7
-rw-r--r--lib/tests/modules/define-enable-with-custom-arg.nix (renamed from lib/tests/modules/custom-arg-define-enable.nix)1
-rw-r--r--lib/tests/modules/import-custom-arg.nix6
3 files changed, 13 insertions, 1 deletions
diff --git a/lib/tests/modules/define-_module-args-custom.nix b/lib/tests/modules/define-_module-args-custom.nix
new file mode 100644
index 00000000000..e565fd215a5
--- /dev/null
+++ b/lib/tests/modules/define-_module-args-custom.nix
@@ -0,0 +1,7 @@
+{ lib, ... }:
+
+{
+  config = {
+    _module.args.custom = true;
+  };
+}
diff --git a/lib/tests/modules/custom-arg-define-enable.nix b/lib/tests/modules/define-enable-with-custom-arg.nix
index f04d30dd9b9..7da74671d14 100644
--- a/lib/tests/modules/custom-arg-define-enable.nix
+++ b/lib/tests/modules/define-enable-with-custom-arg.nix
@@ -2,7 +2,6 @@
 
 {
   config = {
-    _module.args.custom = true;
     enable = custom;
   };
 }
diff --git a/lib/tests/modules/import-custom-arg.nix b/lib/tests/modules/import-custom-arg.nix
new file mode 100644
index 00000000000..3e687b661c1
--- /dev/null
+++ b/lib/tests/modules/import-custom-arg.nix
@@ -0,0 +1,6 @@
+{ lib, custom, ... }:
+
+{
+  imports = []
+  ++ lib.optional custom ./define-enable-force.nix;
+}