mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
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!
(cherry picked from commit 753e43c931)
This commit is contained in:
parent
bd8250ab96
commit
3358486adb
1 changed files with 2 additions and 2 deletions
|
|
@ -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.";
|
||||
}
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue