From 0f5f8725586cf5d7f7251806af85ea041fea6d65 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 26 Dec 2025 15:05:33 +0100 Subject: [PATCH] nodejs: Exclude non-s390x BE platforms Based on upstream's support list, only supported BE platforms are s390x-linux and ppc64-aix. We don't have support for AIX in lib, and I don't know what the exact triplet for that would be, so it's not included here. --- pkgs/development/web/nodejs/nodejs.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/web/nodejs/nodejs.nix b/pkgs/development/web/nodejs/nodejs.nix index 80451e726d51..03d8cbb0dac6 100644 --- a/pkgs/development/web/nodejs/nodejs.nix +++ b/pkgs/development/web/nodejs/nodejs.nix @@ -556,7 +556,12 @@ let changelog = "https://github.com/nodejs/node/releases/tag/v${version}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ aduh95 ]; - platforms = lib.platforms.linux ++ lib.platforms.darwin ++ lib.platforms.freebsd; + # https://github.com/nodejs/node/blob/732ab9d658e057af5191d4ecd156d38487509462/BUILDING.md#platform-list + platforms = + (lib.lists.intersectLists ( + lib.platforms.linux ++ lib.platforms.darwin ++ lib.platforms.freebsd + ) lib.platforms.littleEndian) + ++ [ "s390x-linux" ]; # This broken condition is likely too conservative. Feel free to loosen it if it works. broken = !canExecute && !canEmulate && (stdenv.buildPlatform.parsed.cpu != stdenv.hostPlatform.parsed.cpu);