summary refs log tree commit diff
path: root/pkgs/lib/types.nix
diff options
context:
space:
mode:
authorNicolas Pierron <nicolas.b.pierron@gmail.com>2009-10-12 13:37:00 +0000
committerNicolas Pierron <nicolas.b.pierron@gmail.com>2009-10-12 13:37:00 +0000
commit03eab956182461127726c6410a3a6e748cb3a62a (patch)
treea36aed86246c50612a8d1ec2d1f47bb93ea927ab /pkgs/lib/types.nix
parentc6efc69ad2850894b5b31412455bdf7b188be794 (diff)
downloadnixpkgs-03eab956182461127726c6410a3a6e748cb3a62a.tar
nixpkgs-03eab956182461127726c6410a3a6e748cb3a62a.tar.gz
nixpkgs-03eab956182461127726c6410a3a6e748cb3a62a.tar.bz2
nixpkgs-03eab956182461127726c6410a3a6e748cb3a62a.tar.lz
nixpkgs-03eab956182461127726c6410a3a6e748cb3a62a.tar.xz
nixpkgs-03eab956182461127726c6410a3a6e748cb3a62a.tar.zst
nixpkgs-03eab956182461127726c6410a3a6e748cb3a62a.zip
Only allow properties with a onGlobalEval function to go through specific
types.

svn path=/nixpkgs/trunk/; revision=17756
Diffstat (limited to 'pkgs/lib/types.nix')
-rw-r--r--pkgs/lib/types.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkgs/lib/types.nix b/pkgs/lib/types.nix
index 723dd22e2f0..8b0f61549b5 100644
--- a/pkgs/lib/types.nix
+++ b/pkgs/lib/types.nix
@@ -19,7 +19,7 @@ rec {
   # iter (iterate on all elements contained in this type)
   # fold (fold all elements contained in this type)
   # hasOptions (boolean: whatever this option contains an option set)
-  # delayProperties (boolean: should properties go through the evaluation of this option)
+  # delayOnGlobalEval (boolean: should properties go through the evaluation of this option)
   # docPath (path concatenated to the option name contained in the option set)
   isOptionType = attrs: typeOf attrs == "option-type";
   mkOptionType =
@@ -32,11 +32,11 @@ rec {
     , docPath ? lib.id
     # If the type can contains option sets.
     , hasOptions ? false
-    , delayProperties ? false
+    , delayOnGlobalEval ? false
     }:
 
     { _type = "option-type";
-      inherit name check merge iter fold docPath hasOptions delayProperties;
+      inherit name check merge iter fold docPath hasOptions delayOnGlobalEval;
     };
 
     
@@ -87,7 +87,7 @@ rec {
 
       # You cannot define multiple configurations of one entity, therefore
       # no reason justify to delay properties inside list elements.
-      delayProperties = false;
+      delayOnGlobalEval = false;
     };
 
     attrsOf = elemType: mkOptionType {
@@ -98,7 +98,7 @@ rec {
       iter = f: path: set: lib.mapAttrs (name: elemType.iter f (path + "." + name)) set;
       fold = op: nul: set: fold (e: l: elemType.fold op l e) nul (lib.attrValues set);
       docPath = path: elemType.docPath (path + ".<name>");
-      inherit (elemType) hasOptions delayProperties;
+      inherit (elemType) hasOptions delayOnGlobalEval;
     };
 
     uniq = elemType: mkOptionType {
@@ -125,7 +125,7 @@ rec {
       merge = lib.id;
       check = x: lib.traceValIfNot builtins.isAttrs x;
       hasOptions = true;
-      delayProperties = true;
+      delayOnGlobalEval = true;
     };
 
   };