mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-31 22:51:22 +00:00
Use x == null instead of builtins.isNull x
This commit is contained in:
parent
363e6978ce
commit
b078ae9c16
@ -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)}."
|
||||
|
Loading…
Reference in New Issue
Block a user