From 51d74ca18f35aafc63b44fa8bf5b65ecd8cedee5 Mon Sep 17 00:00:00 2001 From: Ivan Trubach Date: Sat, 17 Jun 2023 23:55:22 +0300 Subject: [PATCH] nodejs: mark as broken when cross-compiling for different OS --- pkgs/development/web/nodejs/nodejs.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/web/nodejs/nodejs.nix b/pkgs/development/web/nodejs/nodejs.nix index 8c70513ec617..dc4066593875 100644 --- a/pkgs/development/web/nodejs/nodejs.nix +++ b/pkgs/development/web/nodejs/nodejs.nix @@ -205,6 +205,14 @@ let platforms = platforms.linux ++ platforms.darwin; mainProgram = "node"; knownVulnerabilities = optional (versionOlder version "18") "This NodeJS release has reached its end of life. See https://nodejs.org/en/about/releases/."; + + # Node.js build system does not have separate host and target OS + # configurations (architectures are defined as host_arch and target_arch, + # but there is no such thing as host_os and target_os). + # + # We may be missing something here, but it doesn’t look like it is + # possible to cross-compile between different operating systems. + broken = stdenv.buildPlatform.parsed.kernel.name != stdenv.hostPlatform.parsed.kernel.name; }; passthru.python = python; # to ensure nodeEnv uses the same version