diff --git a/lib/attrsets.nix b/lib/attrsets.nix index a88947b45858..c0d3ede73d0e 100644 --- a/lib/attrsets.nix +++ b/lib/attrsets.nix @@ -327,7 +327,7 @@ rec { isDerivation "foobar" => false */ - isDerivation = x: isAttrs x && x ? type && x.type == "derivation"; + isDerivation = x: x.type or null == "derivation"; /* Converts a store path to a fake derivation. */ toDerivation = path: