mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
stdenv/problems: use early knowledge of allowBroken and allowBrokenPredicate
(cherry picked from commit 5616e3d925)
This commit is contained in:
committed by
github-actions[bot]
parent
2fef77700c
commit
bd8250ab96
@@ -121,14 +121,16 @@ rec {
|
||||
allowBroken = config.allowBroken || builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1";
|
||||
|
||||
allowBrokenPredicate =
|
||||
if config ? allowBrokenPredicate then
|
||||
lib.warnIf (lib.oldestSupportedReleaseIsAtLeast 2605)
|
||||
"config.allowBrokenPredicate is deprecated, use config.problems.handlers.myPackage.broken = \"warn\" for individual packages instead."
|
||||
config.allowBrokenPredicate
|
||||
else
|
||||
x: false;
|
||||
lib.warnIf (lib.oldestSupportedReleaseIsAtLeast 2605)
|
||||
"config.allowBrokenPredicate is deprecated, use config.problems.handlers.myPackage.broken = \"warn\" for individual packages instead."
|
||||
config.allowBrokenPredicate;
|
||||
in
|
||||
attrs: attrs.meta.broken or false && !allowBroken && !allowBrokenPredicate attrs;
|
||||
if allowBroken then
|
||||
attrs: false
|
||||
else if config ? allowBrokenPredicate then
|
||||
attrs: attrs.meta.broken or false && !allowBrokenPredicate attrs
|
||||
else
|
||||
attrs: attrs.meta.broken or false;
|
||||
value.message = "This package is broken.";
|
||||
}
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user