stdenv/problems: avoid a lookup for meta.broken

The stats may be lying to me when they say that this saves 1.86% of
attrset lookups, and `?` may just not be accurately tracked. But at
worst, performance will stay the same, since the check will fail for all
non-broken packages. And who knows, maybe it does help, by nature of not
checking the value!
This commit is contained in:
Eman Resu
2026-05-25 23:18:10 -04:00
parent 5616e3d925
commit 753e43c931
+2 -2
View File
@@ -128,9 +128,9 @@ rec {
if allowBroken then
attrs: false
else if config ? allowBrokenPredicate then
attrs: attrs.meta.broken or false && !allowBrokenPredicate attrs
attrs: attrs ? meta.broken && attrs.meta.broken && !allowBrokenPredicate attrs
else
attrs: attrs.meta.broken or false;
attrs: attrs ? meta.broken && attrs.meta.broken;
value.message = "This package is broken.";
}
];