about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2022-03-09 15:48:30 +0100
committerRobert Hensing <robert@roberthensing.nl>2022-03-09 15:48:30 +0100
commit3ddac7a41a3b755e2317a3e9ba2b2e61b57b9fb3 (patch)
tree08332b258f0cbe2e3cf27824ab0e7088958b851e /lib
parent74be820bb625725ca92b8c6c32dc4b6d0010de89 (diff)
lib.isDerivation: Simplify
Diffstat (limited to 'lib')
-rw-r--r--lib/attrsets.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/attrsets.nix b/lib/attrsets.nix
index a88947b458588..c0d3ede73d0e6 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: