Merge pull request #163458 from NixOS/lib-isDerivation-simplify

lib.isDerivation: Simplify
This commit is contained in:
Robert Hensing 2022-03-09 17:37:52 +01:00 committed by GitHub
commit f02a438ae4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: