diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2015-12-04 07:22:57 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2015-12-04 07:22:57 +0300 |
commit | b078ae9c16ce0cbb0022d7c5c59c571a8390d580 (patch) | |
tree | b32f7f899f395c947556edfeb4fd396f41b1b494 /lib/types.nix | |
parent | 363e6978ced1023c6daceaad647155361e3bda9e (diff) |
Use x == null instead of builtins.isNull x
Diffstat (limited to 'lib/types.nix')
-rw-r--r-- | lib/types.nix | 4 |
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)}." |