Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backport staging-24.11] libuv and Node.js changes #368368

Open
wants to merge 6 commits into
base: staging-24.11
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions pkgs/development/libraries/libuv/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
}:

stdenv.mkDerivation (finalAttrs: {
version = "1.48.0";
version = "1.49.2";
pname = "libuv";

src = fetchFromGitHub {
owner = "libuv";
repo = "libuv";
rev = "v${finalAttrs.version}";
hash = "sha256-U68BmIQNpmIy3prS7LkYl+wvDJQNikoeFiKh50yQFoA=";
hash = "sha256-hNXW3cQVW8VGMQrHFkezRI2OqYF7Qf1riD8sHy66qxg=";
};

outputs = [
Expand Down Expand Up @@ -83,7 +83,6 @@ stdenv.mkDerivation (finalAttrs: {
"tcp_ref3"
"tcp_ref4"
"tcp_bind6_error_inval"
"tcp_bind6_error_addrinuse"
"tcp_read_stop"
"tcp_unexpected_read"
"tcp_write_to_half_open_connection"
Expand All @@ -98,7 +97,6 @@ stdenv.mkDerivation (finalAttrs: {
"tcp_open"
"tcp_write_queue_order"
"tcp_try_write"
"tcp_writealot"
"multiple_listen"
"delayed_accept"
"udp_recv_in_a_row"
Expand All @@ -109,7 +107,6 @@ stdenv.mkDerivation (finalAttrs: {
"tty_pty"
"condvar_5"
"hrtime"
"udp_multicast_join"
# Tests that fail when sandboxing is enabled.
"fs_event_close_in_callback"
"fs_event_watch_dir"
Expand All @@ -122,6 +119,11 @@ stdenv.mkDerivation (finalAttrs: {
"udp_create_early_bad_bind"
"fs_event_watch_delete_dir"
]
++ lib.optionals (stdenv.hostPlatform.isDarwin && lib.versionOlder finalAttrs.version "1.49.3") [
# https://github.com/libuv/libuv/issues/4650
# can enable on upgrade from 1.49.2
"udp_mmsg"
]
++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
# fail on macos < 10.15 (starting in libuv 1.47.0)
"fs_write_alotof_bufs_with_offset"
Expand Down
16 changes: 12 additions & 4 deletions pkgs/development/web/nodejs/nodejs.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, openssl, python, zlib, libuv, http-parser, icu, bash
{ lib, stdenv, fetchurl, openssl, python, zlib, libuv, sqlite, http-parser, icu, bash
, ninja, pkgconf, unixtools, runCommand, buildPackages
, testers
# for `.pkgs` attribute
Expand Down Expand Up @@ -97,8 +97,15 @@ let
# TODO: also handle MIPS flags (mips_arch, mips_fpu, mips_float_abi).

useSharedHttpParser = !stdenv.hostPlatform.isDarwin && lib.versionOlder "${majorVersion}.${minorVersion}" "11.4";

sharedLibDeps = { inherit openssl zlib libuv; } // (lib.optionalAttrs useSharedHttpParser { inherit http-parser; });
useSharedSQLite = lib.versionAtLeast version "22.5";

sharedLibDeps = {
inherit openssl zlib libuv;
} // (lib.optionalAttrs useSharedHttpParser {
inherit http-parser;
}) // (lib.optionalAttrs useSharedSQLite {
inherit sqlite;
});

copyLibHeaders =
map
Expand Down Expand Up @@ -151,7 +158,8 @@ let
# wrappers over the corresponding JS scripts. There are some packages though
# that use bash wrappers, e.g. polaris-web.
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ApplicationServices ]
++ [ zlib libuv openssl http-parser icu bash ];
++ [ zlib libuv openssl http-parser icu bash ]
++ lib.optionals useSharedSQLite [ sqlite ];

nativeBuildInputs =
[
Expand Down
28 changes: 0 additions & 28 deletions pkgs/development/web/nodejs/v22.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,6 @@ buildNodejs {
./use-correct-env-in-tests.patch
./bin-sh-node-run-v22.patch

# Those reverts are due to a mismatch with the libuv version used upstream
(fetchpatch2 {
url = "https://github.com/nodejs/node/commit/84fe809535b0954bbfed8658d3ede8a2f0e030db.patch?full_index=1";
hash = "sha256-C1xG2K9Ejofqkl/vKWLBz3vE0mIPBjCdfA5GX2wlS0I=";
revert = true;
})
(fetchpatch2 {
url = "https://github.com/nodejs/node/commit/dcbc5fbe65b068a90c3d0970155d3a68774caa38.patch?full_index=1";
hash = "sha256-Q7YrooolMjsGflTQEj5ra6hRVGhMP6APaydf1MGH54Q=";
revert = true;
excludes = [ "doc/*" ];
})
(fetchpatch2 {
url = "https://github.com/nodejs/node/commit/ec867ac7ce4e4913a8415eda48a7af9fc226097d.patch?full_index=1";
hash = "sha256-zfnHxC7ZMZAiu0/6PsX7RFasTevHMETv+azhTZnKI64=";
revert = true;
excludes = [ "doc/*" ];
})
(fetchpatch2 {
url = "https://github.com/nodejs/node/commit/f97865fab436fba24b46dad14435ec4b482243a2.patch?full_index=1";
hash = "sha256-o5aPQqUXubtJKMX28jn8LdjZHw37/BqENkYt6RAR3kY=";
revert = true;
})
(fetchpatch2 {
url = "https://github.com/nodejs/node/commit/54d55f2337ebe04451da770935ad453accb147f9.patch?full_index=1";
hash = "sha256-gmIyiSyNzC3pClL1SM2YicckWM+/2tsbV1xv2S3d5G0=";
revert = true;
})
# Fix for https://github.com/NixOS/nixpkgs/issues/355919
# FIXME: remove after a minor point release
(fetchpatch2 {
Expand Down
28 changes: 0 additions & 28 deletions pkgs/development/web/nodejs/v23.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,6 @@ buildNodejs {
./use-correct-env-in-tests.patch
./bin-sh-node-run-v22.patch

# Those reverts are due to a mismatch with the libuv version used upstream
(fetchpatch2 {
url = "https://github.com/nodejs/node/commit/84fe809535b0954bbfed8658d3ede8a2f0e030db.patch?full_index=1";
hash = "sha256-C1xG2K9Ejofqkl/vKWLBz3vE0mIPBjCdfA5GX2wlS0I=";
revert = true;
})
(fetchpatch2 {
url = "https://github.com/nodejs/node/commit/dcbc5fbe65b068a90c3d0970155d3a68774caa38.patch?full_index=1";
hash = "sha256-Q7YrooolMjsGflTQEj5ra6hRVGhMP6APaydf1MGH54Q=";
revert = true;
excludes = [ "doc/*" ];
})
(fetchpatch2 {
url = "https://github.com/nodejs/node/commit/ec867ac7ce4e4913a8415eda48a7af9fc226097d.patch?full_index=1";
hash = "sha256-zfnHxC7ZMZAiu0/6PsX7RFasTevHMETv+azhTZnKI64=";
revert = true;
excludes = [ "doc/*" ];
})
(fetchpatch2 {
url = "https://github.com/nodejs/node/commit/f97865fab436fba24b46dad14435ec4b482243a2.patch?full_index=1";
hash = "sha256-o5aPQqUXubtJKMX28jn8LdjZHw37/BqENkYt6RAR3kY=";
revert = true;
})
(fetchpatch2 {
url = "https://github.com/nodejs/node/commit/54d55f2337ebe04451da770935ad453accb147f9.patch?full_index=1";
hash = "sha256-gmIyiSyNzC3pClL1SM2YicckWM+/2tsbV1xv2S3d5G0=";
revert = true;
})
# FIXME: remove after a minor point release
(fetchpatch2 {
url = "https://github.com/nodejs/node/commit/49acdc8748fe9fe83bc1b444e24c456dff00ecc5.patch?full_index=1";
Expand Down
Loading