@@ -165,6 +165,7 @@ let
165165 isFcitxEngine = bool;
166166 isIbusEngine = bool;
167167 isGutenprint = bool;
168+ badPlatforms = platforms;
168169 };
169170
170171 checkMetaAttr = k: v:
@@ -174,7 +175,8 @@ let
174175 checkMeta = meta: if shouldCheckMeta then lib.remove null (lib.mapAttrsToList checkMetaAttr meta) else [];
175176
176177 checkPlatform = attrs:
177− lib.any (lib.meta.platformMatch hostPlatform) attrs.meta.platforms;
178+ (!(attrs ? meta.platforms) || lib.any (lib.meta.platformMatch hostPlatform) attrs.meta.platforms) &&
179+ (!(attrs ? meta.badPlatforms && lib.any (lib.meta.platformMatch hostPlatform) attrs.meta.badPlatforms));
178180
179181 # Check if a derivation is valid, that is whether it passes checks for
180182 # e.g brokenness or license.
@@ -189,7 +191,7 @@ let
189191 { valid = false; reason = "blacklisted"; errormsg = "has a blacklisted license (‘${showLicense attrs.meta.license}’)"; }
190192 else if !allowBroken && attrs.meta.broken or false then
191193 { valid = false; reason = "broken"; errormsg = "is marked as broken"; }
192− else if !allowUnsupportedSystem && !allowBroken && attrs.meta.platforms or null != null && !(checkPlatform attrs) then
194+ else if !allowUnsupportedSystem && !allowBroken && !(checkPlatform attrs) then
193195 { valid = false; reason = "broken"; errormsg = "is not supported on ‘${hostPlatform.config}’"; }
194196 else if !(hasAllowedInsecure attrs) then
195197 { valid = false; reason = "insecure"; errormsg = "is marked as insecure"; }