Merge pull request #163458 from NixOS/lib-isDerivation-simplify
lib.isDerivation: Simplify
commitf02a438ae4eda778a14ea7b0c8fbc1fa89c05474
authorRobert Hensing <roberth@users.noreply.github.com>
dateWed 9 Mar 2022, 17:37 (5 years ago)
parentf02094d3ddac7a
lib/attrsets.nix+1−1
@@ -327,7 +327,7 @@ rec {
327327 isDerivation "foobar"
328328 => false
329329 */
330− isDerivation = x: isAttrs x && x ? type && x.type == "derivation";
330+ isDerivation = x: x.type or null == "derivation";
331331
332332 /* Converts a store path to a fake derivation. */
333333 toDerivation = path: