summary refs log tree commit diff
path: root/lib/types.nix
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2015-12-04 07:22:57 +0300
committerIgor Pashev <pashev.igor@gmail.com>2015-12-04 07:22:57 +0300
commitb078ae9c16ce0cbb0022d7c5c59c571a8390d580 (patch)
treeb32f7f899f395c947556edfeb4fd396f41b1b494 /lib/types.nix
parent363e6978ced1023c6daceaad647155361e3bda9e (diff)
downloadnixlib-b078ae9c16ce0cbb0022d7c5c59c571a8390d580.tar
nixlib-b078ae9c16ce0cbb0022d7c5c59c571a8390d580.tar.gz
nixlib-b078ae9c16ce0cbb0022d7c5c59c571a8390d580.tar.bz2
nixlib-b078ae9c16ce0cbb0022d7c5c59c571a8390d580.tar.lz
nixlib-b078ae9c16ce0cbb0022d7c5c59c571a8390d580.tar.xz
nixlib-b078ae9c16ce0cbb0022d7c5c59c571a8390d580.tar.zst
nixlib-b078ae9c16ce0cbb0022d7c5c59c571a8390d580.zip
Use x == null instead of builtins.isNull x
Diffstat (limited to 'lib/types.nix')
-rw-r--r--lib/types.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/types.nix b/lib/types.nix
index d750768335ca..b833417e73d4 100644
--- a/lib/types.nix
+++ b/lib/types.nix
@@ -193,9 +193,9 @@ rec {
 
     nullOr = elemType: mkOptionType {
       name = "null or ${elemType.name}";
-      check = x: builtins.isNull x || elemType.check x;
+      check = x: x == null || elemType.check x;
       merge = loc: defs:
-        let nrNulls = count (def: isNull def.value) defs; in
+        let nrNulls = count (def: def.value == null) defs; in
         if nrNulls == length defs then null
         else if nrNulls != 0 then
           throw "The option `${showOption loc}' is defined both null and not null, in ${showFiles (getFiles defs)}."