summary refs log tree commit diff
path: root/lib/attrsets.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lib/attrsets.nix')
-rw-r--r--lib/attrsets.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/attrsets.nix b/lib/attrsets.nix
index 28e6cd09f85..516fdd8d33f 100644
--- a/lib/attrsets.nix
+++ b/lib/attrsets.nix
@@ -424,7 +424,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: