diff --git a/pkgs/development/web/nodejs/nodejs.nix b/pkgs/development/web/nodejs/nodejs.nix index a85644c10bd3..8b2d27e884ac 100644 --- a/pkgs/development/web/nodejs/nodejs.nix +++ b/pkgs/development/web/nodejs/nodejs.nix @@ -143,6 +143,7 @@ let inherit brotli libuv + nghttp2 nghttp3 ngtcp2 openssl @@ -151,16 +152,6 @@ let ; cares = c-ares; http-parser = llhttp; - nghttp2 = nghttp2.overrideAttrs { - patches = [ - (fetchpatch2 { - url = "https://github.com/nghttp2/nghttp2/commit/7784fa979d0bcf801a35f1afbb25fb048d815cd7.patch?full_index=1"; - hash = "sha256-RG87Qifjpl7HTP9ac2JwHj2XAbDlFgOpAnpZX3ET6gU="; - excludes = [ "lib/includes/nghttp2/nghttp2.h" ]; - revert = true; - }) - ]; - }; } // (lib.optionalAttrs useSharedAdaAndSimd { inherit diff --git a/pkgs/development/web/nodejs/v20.nix b/pkgs/development/web/nodejs/v20.nix index c30df6a7f038..dbde28aa29ca 100644 --- a/pkgs/development/web/nodejs/v20.nix +++ b/pkgs/development/web/nodejs/v20.nix @@ -67,6 +67,20 @@ buildNodejs { hash = "sha256-lfq8PMNvrfJjlp0oE3rJkIsihln/Gcs1T/qgI3wW2kQ="; includes = [ "test/*" ]; }) + # Patch for nghttp2 1.69 support + (fetchpatch2 { + url = "https://github.com/nodejs/node/commit/ecbc22dc3709290dcaadf634a28d8307a75952ee.diff?full_index=1"; + hash = "sha256-LwniqgKlG1IiqSzdP7UgBw3/9cn1jyz/jtx45yb6RWM="; + includes = [ + "test/parallel/test-http2-misbehaving-flow-control-paused.js" + "test/parallel/test-http2-misbehaving-flow-control.js" + ]; + }) + (fetchpatch2 { + url = "https://github.com/nodejs/node/commit/4a32c00fb8dbe55c3bcf9ef43343968c9fe449e6.diff?full_index=1"; + hash = "sha256-pex8ruwa4b/vWvfGA+nyN3JJP8NOturmwAQe4Rkd6nU="; + excludes = [ "tools/nix/*" ]; + }) ] ++ gypPatches; } diff --git a/pkgs/development/web/nodejs/v22.nix b/pkgs/development/web/nodejs/v22.nix index b2c6f961b601..3c73fdd91bbf 100644 --- a/pkgs/development/web/nodejs/v22.nix +++ b/pkgs/development/web/nodejs/v22.nix @@ -78,5 +78,19 @@ buildNodejs { hash = "sha256-lfq8PMNvrfJjlp0oE3rJkIsihln/Gcs1T/qgI3wW2kQ="; includes = [ "test/*" ]; }) + # Patch for nghttp2 1.69 support + (fetchpatch2 { + url = "https://github.com/nodejs/node/commit/ecbc22dc3709290dcaadf634a28d8307a75952ee.diff?full_index=1"; + hash = "sha256-LwniqgKlG1IiqSzdP7UgBw3/9cn1jyz/jtx45yb6RWM="; + includes = [ + "test/parallel/test-http2-misbehaving-flow-control-paused.js" + "test/parallel/test-http2-misbehaving-flow-control.js" + ]; + }) + (fetchpatch2 { + url = "https://github.com/nodejs/node/commit/4a32c00fb8dbe55c3bcf9ef43343968c9fe449e6.diff?full_index=1"; + hash = "sha256-pex8ruwa4b/vWvfGA+nyN3JJP8NOturmwAQe4Rkd6nU="; + excludes = [ "tools/nix/*" ]; + }) ]; } diff --git a/pkgs/development/web/nodejs/v24.nix b/pkgs/development/web/nodejs/v24.nix index 6c0c164e9285..0856821b5b69 100644 --- a/pkgs/development/web/nodejs/v24.nix +++ b/pkgs/development/web/nodejs/v24.nix @@ -63,6 +63,13 @@ buildNodejs { url = "https://github.com/nodejs/node/commit/dd25d8f29d3ddadcf5a5ebfdf98ece55f9df96c6.patch?full_index=1"; hash = "sha256-6cxRN7TyWmJgUZt3jp2YXbVIjrDb2BNep5LxBOtT3Q0="; }) + + # Patch for nghttp2 1.69 support + (fetchpatch2 { + url = "https://github.com/nodejs/node/commit/4a32c00fb8dbe55c3bcf9ef43343968c9fe449e6.diff?full_index=1"; + hash = "sha256-pex8ruwa4b/vWvfGA+nyN3JJP8NOturmwAQe4Rkd6nU="; + excludes = [ "tools/nix/*" ]; + }) ] ++ gypPatches ++ lib.optionals (!stdenv.buildPlatform.isDarwin) [ diff --git a/pkgs/development/web/nodejs/v26.nix b/pkgs/development/web/nodejs/v26.nix index 237b68269fe8..ba1f1ab616f6 100644 --- a/pkgs/development/web/nodejs/v26.nix +++ b/pkgs/development/web/nodejs/v26.nix @@ -64,6 +64,14 @@ buildNodejs { hash = "sha256-Ks9mT/7fcJ9nl8FWHq7HrVP+ZHF9AEOYV7xsN/NOWII="; }) + # Patch for nghttp2 1.69 support + # TODO: remove when included in a next release + (fetchpatch2 { + url = "https://github.com/nodejs/node/commit/4a32c00fb8dbe55c3bcf9ef43343968c9fe449e6.diff?full_index=1"; + hash = "sha256-pex8ruwa4b/vWvfGA+nyN3JJP8NOturmwAQe4Rkd6nU="; + excludes = [ "tools/nix/*" ]; + }) + # https://github.com/NixOS/nixpkgs/pull/507974#issuecomment-4249433124 # OpenSSL reports different errors # https://github.com/nodejs/node/pull/62629