summary refs log tree commit diff
path: root/lib/modules.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-11-12 13:48:19 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-11-12 13:48:30 +0100
commit785eaf2cea3c57daef96bb209f44589e3f48a7ff (patch)
tree3324d7de769b7a5c063107b09b294b6af2b823e1 /lib/modules.nix
parent39e9fabae0fe5476ad682a52dba42b2c6dbe1a57 (diff)
downloadnixpkgs-785eaf2cea3c57daef96bb209f44589e3f48a7ff.tar
nixpkgs-785eaf2cea3c57daef96bb209f44589e3f48a7ff.tar.gz
nixpkgs-785eaf2cea3c57daef96bb209f44589e3f48a7ff.tar.bz2
nixpkgs-785eaf2cea3c57daef96bb209f44589e3f48a7ff.tar.lz
nixpkgs-785eaf2cea3c57daef96bb209f44589e3f48a7ff.tar.xz
nixpkgs-785eaf2cea3c57daef96bb209f44589e3f48a7ff.tar.zst
nixpkgs-785eaf2cea3c57daef96bb209f44589e3f48a7ff.zip
Add some primops to lib
Diffstat (limited to 'lib/modules.nix')
-rw-r--r--lib/modules.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/modules.nix b/lib/modules.nix
index 071809daa58..fa31ce6399c 100644
--- a/lib/modules.nix
+++ b/lib/modules.nix
@@ -42,7 +42,7 @@ rec {
   closeModules = modules: args:
     let
       toClosureList = file: parentKey: imap (n: x:
-        if isAttrs x || builtins.isFunction x then
+        if isAttrs x || isFunction x then
           unifyModuleSyntax file "${parentKey}:anon-${toString n}" (applyIfFunction x args)
         else
           unifyModuleSyntax (toString x) (toString x) (applyIfFunction (import x) args));
@@ -74,7 +74,7 @@ rec {
         config = removeAttrs m ["key" "_file" "require" "imports"];
       };
 
-  applyIfFunction = f: arg: if builtins.isFunction f then f arg else f;
+  applyIfFunction = f: arg: if isFunction f then f arg else f;
 
   /* Merge a list of modules.  This will recurse over the option
      declarations in all modules, combining them into a single set.
@@ -260,7 +260,7 @@ rec {
       options' = opt.options or
         (throw "Option `${showOption loc'}' has type optionSet but has no option attribute.");
       coerce = x:
-        if builtins.isFunction x then x
+        if isFunction x then x
         else { config, ... }: { options = x; };
       options = map coerce (flatten options');
       f = tp: