diff --git a/pkgs/development/web/nodejs/v18.nix b/pkgs/development/web/nodejs/v18.nix index 6099d100675a..1ab63eac7951 100644 --- a/pkgs/development/web/nodejs/v18.nix +++ b/pkgs/development/web/nodejs/v18.nix @@ -47,5 +47,12 @@ buildNodejs { url = "https://github.com/nodejs/node/commit/d0a6b605fba6cd69a82e6f12ff0363eef8fe1ee9.patch"; hash = "sha256-TfYal/PikRZHL6zpAlC3SmkYXCe+/8Gs83dLX/X/P/k="; }) + # Remove unused `fdopen` in vendored zlib, which causes compilation failures with clang 18 on Darwin. + (fetchpatch2 { + url = "https://github.com/madler/zlib/commit/4bd9a71f3539b5ce47f0c67ab5e01f3196dc8ef9.patch?full_index=1"; + extraPrefix = "deps/v8/third_party/zlib/"; + stripLen = 1; + hash = "sha256-WVxsoEcJu0WBTyelNrVQFTZxJhnekQb1GrueeRBRdnY="; + }) ] ++ gypPatches; } diff --git a/pkgs/development/web/nodejs/v20.nix b/pkgs/development/web/nodejs/v20.nix index 4b0be19dad77..9f0e1cc38b88 100644 --- a/pkgs/development/web/nodejs/v20.nix +++ b/pkgs/development/web/nodejs/v20.nix @@ -48,5 +48,12 @@ buildNodejs { url = "https://github.com/nodejs/node/commit/0f7bdcc17fbc7098b89f238f4bd8ecad9367887b.patch?full_index=1"; hash = "sha256-lXx6QyD2anlY9qAwjNMFM2VcHckBshghUF1NaMoaNl4="; }) + # Remove unused `fdopen` in vendored zlib, which causes compilation failures with clang 18 on Darwin. + (fetchpatch2 { + url = "https://github.com/madler/zlib/commit/4bd9a71f3539b5ce47f0c67ab5e01f3196dc8ef9.patch?full_index=1"; + extraPrefix = "deps/v8/third_party/zlib/"; + stripLen = 1; + hash = "sha256-WVxsoEcJu0WBTyelNrVQFTZxJhnekQb1GrueeRBRdnY="; + }) ] ++ gypPatches; }