summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobert Hensing <roberth@users.noreply.github.com>2022-03-09 17:37:52 +0100
committerGitHub <noreply@github.com>2022-03-09 17:37:52 +0100
commitf02a438ae4eda778a14ea7b0c8fbc1fa89c05474 (patch)
tree0327aa78ebec2109e960c1cd2f5fc5f2eed80a06
parentf02094df7281aa6fecd32bcb0f78e649ceb8fef2 (diff)
parent3ddac7a41a3b755e2317a3e9ba2b2e61b57b9fb3 (diff)
downloadnixpkgs-f02a438ae4eda778a14ea7b0c8fbc1fa89c05474.tar
nixpkgs-f02a438ae4eda778a14ea7b0c8fbc1fa89c05474.tar.gz
nixpkgs-f02a438ae4eda778a14ea7b0c8fbc1fa89c05474.tar.bz2
nixpkgs-f02a438ae4eda778a14ea7b0c8fbc1fa89c05474.tar.lz
nixpkgs-f02a438ae4eda778a14ea7b0c8fbc1fa89c05474.tar.xz
nixpkgs-f02a438ae4eda778a14ea7b0c8fbc1fa89c05474.tar.zst
nixpkgs-f02a438ae4eda778a14ea7b0c8fbc1fa89c05474.zip
Merge pull request #163458 from NixOS/lib-isDerivation-simplify
lib.isDerivation: Simplify
-rw-r--r--lib/attrsets.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/attrsets.nix b/lib/attrsets.nix
index a88947b4585..c0d3ede73d0 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: