From f4286483ee2aaa30eaf1ab8c04cebd5131738e6f Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sat, 18 Jun 2022 14:48:42 +0200 Subject: [PATCH] release-lib.nix: make packagePlatforms respect badPlatforms packagePlatforms previously ignored badPlatforms, probably because it is a fairly [recent] addition. While check-meta.nix doesn't implement it using subtractLists, it is basically equivalent to the following logic: platformSet - badPlatformSet (= effectivePlatformSet) which we implement using subtractLists (which has somewhat confusing currying-optimized argument order). This flaw was discovered when testing #177901 which heavily uses badPlatforms. [recent]: https://github.com/NixOS/nixpkgs/commit/b0482248fefbf3b6cdd9c92053cfb49778a3a3a8 --- pkgs/top-level/release-lib.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/release-lib.nix b/pkgs/top-level/release-lib.nix index e066d191ef2..45874d33b0f 100644 --- a/pkgs/top-level/release-lib.nix +++ b/pkgs/top-level/release-lib.nix @@ -146,7 +146,8 @@ rec { packagePlatforms = mapAttrs (name: value: if isDerivation value then value.meta.hydraPlatforms - or (value.meta.platforms or [ "x86_64-linux" ]) + or (lib.subtractLists (value.meta.badPlatforms or []) + (value.meta.platforms or [ "x86_64-linux" ])) else if value.recurseForDerivations or false || value.recurseForRelease or false then packagePlatforms value else