summary refs log tree commit diff
path: root/lib/options.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/options.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/options.nix')
-rw-r--r--lib/options.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/options.nix b/lib/options.nix
index 63798c4faa3..71e02db58f6 100644
--- a/lib/options.nix
+++ b/lib/options.nix
@@ -34,12 +34,12 @@ rec {
   mergeDefaultOption = loc: defs:
     let list = getValues defs; in
     if length list == 1 then head list
-    else if all builtins.isFunction list then x: mergeDefaultOption loc (map (f: f x) list)
+    else if all isFunction list then x: mergeDefaultOption loc (map (f: f x) list)
     else if all isList list then concatLists list
     else if all isAttrs list then fold lib.mergeAttrs {} list
-    else if all builtins.isBool list then fold lib.or false list
-    else if all builtins.isString list then lib.concatStrings list
-    else if all builtins.isInt list && all (x: x == head list) list then head list
+    else if all isBool list then fold lib.or false list
+    else if all isString list then lib.concatStrings list
+    else if all isInt list && all (x: x == head list) list then head list
     else throw "Cannot merge definitions of `${showOption loc}' given in ${showFiles (getFiles defs)}.";
 
   /* Obsolete, will remove soon.  Specify an option type or apply
@@ -54,7 +54,7 @@ rec {
 
   mergeListOption = mergeTypedOption "list" isList concatLists;
 
-  mergeStringOption = mergeTypedOption "string" builtins.isString lib.concatStrings;
+  mergeStringOption = mergeTypedOption "string" isString lib.concatStrings;
 
   mergeOneOption = loc: defs:
     if defs == [] then abort "This case should never happen."