summary refs log tree commit diff
path: root/lib/trivial.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/trivial.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/trivial.nix')
-rw-r--r--lib/trivial.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/trivial.nix b/lib/trivial.nix
index 8af3474f2a6..760a74ce666 100644
--- a/lib/trivial.nix
+++ b/lib/trivial.nix
@@ -16,7 +16,7 @@ rec {
   or = x: y: x || y;
   and = x: y: x && y;
   mergeAttrs = x: y: x // y;
-  
+
   # Take a function and evaluate it with its own returned value.
   fix = f: let result = f result; in result;
 
@@ -26,7 +26,7 @@ rec {
   # `seq x y' evaluates x, then returns y.  That is, it forces strict
   # evaluation of its first argument.
   seq = x: y: if x == null then y else y;
-  
+
   # Like `seq', but recurses into lists and attribute sets to force evaluation
   # of all list elements/attributes.
   deepSeq = x: y:
@@ -35,4 +35,10 @@ rec {
     else if builtins.isAttrs x
       then deepSeqAttrs x y
       else seq x y;
+
+  # Pull in some builtins not included elsewhere.
+  inherit (builtins)
+    pathExists readFile isBool isFunction
+    isInt add sub lessThan;
+
 }