From b078ae9c16ce0cbb0022d7c5c59c571a8390d580 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Fri, 4 Dec 2015 07:22:57 +0300 Subject: [PATCH] Use x == null instead of builtins.isNull x --- lib/types.nix | 4 ++-- 1 file 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)}."