From 940ca9b84b0a7b066ee8179dce01fbe03367ab46 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Wed, 24 Jun 2026 07:24:23 -0400 Subject: [PATCH 1/5] curlMinimal: 8.20.0 -> 8.21.0 https://github.com/curl/curl/releases/tag/curl-8_21_0 Signed-off-by: Sefa Eyeoglu --- .../curlMinimal/fix-wakeup-consumption.patch | 32 ------------------- pkgs/by-name/cu/curlMinimal/package.nix | 11 ++----- 2 files changed, 2 insertions(+), 41 deletions(-) delete mode 100644 pkgs/by-name/cu/curlMinimal/fix-wakeup-consumption.patch diff --git a/pkgs/by-name/cu/curlMinimal/fix-wakeup-consumption.patch b/pkgs/by-name/cu/curlMinimal/fix-wakeup-consumption.patch deleted file mode 100644 index 0bc04b60bb87..000000000000 --- a/pkgs/by-name/cu/curlMinimal/fix-wakeup-consumption.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 2a2104f3cff44bb28bb570a093be52bbeeed8f23 Mon Sep 17 00:00:00 2001 -From: Stefan Eissing -Date: Mon, 11 May 2026 14:56:04 +0200 -Subject: [PATCH] event: fix wakeup consumption - -The events on a multi wakeup socketpair were only consumed via -curl_multi_poll()/curl_multi_wait() but not in event based processing on -a curl_multi_socket() call. That led to busy loops as reported in - -Fixes #21547 -Reported-by: Earnestly on github -Closes #21549 ---- - lib/multi.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/lib/multi.c b/lib/multi.c -index be32740a7097..5e84133f13fd 100644 ---- a/lib/multi.c -+++ b/lib/multi.c -@@ -2703,6 +2703,11 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, - Curl_uint32_bset_remove(&multi->dirty, data->mid); - - if(data == multi->admin) { -+#ifdef ENABLE_WAKEUP -+ /* Consume any pending wakeup signals before processing. -+ * This is necessary for event based processing. See #21547 */ -+ (void)Curl_wakeup_consume(multi->wakeup_pair, TRUE); -+#endif - #ifdef USE_RESOLV_THREADED - Curl_async_thrdd_multi_process(multi); - #endif diff --git a/pkgs/by-name/cu/curlMinimal/package.nix b/pkgs/by-name/cu/curlMinimal/package.nix index a25ea809c62b..832ffbbd04b6 100644 --- a/pkgs/by-name/cu/curlMinimal/package.nix +++ b/pkgs/by-name/cu/curlMinimal/package.nix @@ -84,7 +84,7 @@ assert stdenv.mkDerivation (finalAttrs: { pname = "curl"; - version = "8.20.0"; + version = "8.21.0"; src = fetchurl { urls = [ @@ -93,16 +93,9 @@ stdenv.mkDerivation (finalAttrs: { builtins.replaceStrings [ "." ] [ "_" ] finalAttrs.version }/curl-${finalAttrs.version}.tar.xz" ]; - hash = "sha256-Y/4twUi6DOromSLvg49+XJRicsLni3xZ+rS3nTziuJY="; + hash = "sha256-qhtmpw6s6D3GJFCHRWRsCK5WHeUSq0A63/uTrIf8cuY="; }; - patches = [ - # https://github.com/curl/curl/commit/2a2104f3cff44bb28bb570a093be52bbeeed8f23 - # According to , this fixes - # a performance regression, causing high CPU usage - ./fix-wakeup-consumption.patch - ]; - # this could be accomplished by updateAutotoolsGnuConfigScriptsHook, but that causes infinite recursion # necessary for FreeBSD code path in configure postPatch = '' From ce113a1be55206fbb91c1969cb82f615d4dfc7ff Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Wed, 24 Jun 2026 22:46:44 -0400 Subject: [PATCH 2/5] Revert "python3Packages.pycapnp: backport patch for py314 compat" This reverts commit 9518afa893a183c0154b8597d6f5cd587dc1b5a1. Patch already included in 2.2.3 which causes applying the patch to fail --- pkgs/development/python-modules/pycapnp/default.nix | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkgs/development/python-modules/pycapnp/default.nix b/pkgs/development/python-modules/pycapnp/default.nix index c5c58935f5d4..d60a1b28d4b3 100644 --- a/pkgs/development/python-modules/pycapnp/default.nix +++ b/pkgs/development/python-modules/pycapnp/default.nix @@ -3,7 +3,6 @@ buildPythonPackage, replaceVars, fetchFromGitHub, - fetchpatch, setuptools, wheel, capnproto, @@ -36,12 +35,6 @@ buildPythonPackage rec { # other than the builtin schemas (based on quick GitHub code search), so I don't # think it's worthwhile. (replaceVars ./include-paths.patch { inherit capnproto; }) - - (fetchpatch { - url = "https://github.com/capnproto/pycapnp/commit/aa90ab6844df4718f02e2ca4974858d5ab0b079c.patch"; - name = "python314-compat.patch"; - hash = "sha256-pscOdgPotLZsW0XWyRTJigIDl3uWOizA1W0gQGZHSyg="; - }) ]; build-system = [ From 200ea92beda611794cfea33cfe23b314fab66d00 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Wed, 24 Jun 2026 21:55:37 -0400 Subject: [PATCH 3/5] lix: revert performance patch for curl curl 8.21.0 contains https://github.com/curl/curl/commit/2a2104f3cff44bb28bb570a093be52bbeeed8f23 which breaks lix for some reason. Revert this single change just for lix as a workaround Signed-off-by: Sefa Eyeoglu --- .../tools/package-management/lix/common-lix.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/package-management/lix/common-lix.nix b/pkgs/tools/package-management/lix/common-lix.nix index d5277055efd2..fdd550e8c8d1 100644 --- a/pkgs/tools/package-management/lix/common-lix.nix +++ b/pkgs/tools/package-management/lix/common-lix.nix @@ -39,6 +39,7 @@ assert lib.assertMsg ( darwin, doxygen, editline, + fetchpatch2, flex, git, gtest, @@ -127,16 +128,24 @@ let substitute $inputPath $out --replace-fail @deps@ "$(cat ${deps})" ''; - # https://github.com/NixOS/nixpkgs/pull/525953 backported a performance patch - # that /somehow/ breaks Lix unit tests. - # FIXME revert when the patch is gone in curl drv + # curl 8.21.0 /somehow/ breaks Lix unit tests. + # See https://github.com/NixOS/nixpkgs/issues/534713 + # FIXME remove once fixed curl-fixed = curl.overrideAttrs ( { patches ? [ ], ... }: { - patches = lib.filter (patch: !lib.strings.hasSuffix "fix-wakeup-consumption.patch" patch) patches; + patches = patches ++ [ + # See https://github.com/curl/curl/commit/2a2104f3cff44bb28bb570a093be52bbeeed8f23 + (fetchpatch2 { + name = "fix-wakeup-consumption-revert.patch"; + url = "https://github.com/curl/curl/commit/2a2104f3cff44bb28bb570a093be52bbeeed8f23.patch"; + hash = "sha256-dkwr1ZaR7XB408JxeIKhuHxJrlwf3J01jL6lnOLXo1I="; + revert = true; + }) + ]; } ); in From 339d13830e1ef7c50d1a856e1e706b71881f4f69 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Fri, 26 Jun 2026 11:30:25 -0400 Subject: [PATCH 4/5] python3Packages.pycurl: Allow websockets tests to run curlFull comes with websockets support which seems to fail the websockets tests in pycurl, as it needs python websockets. Signed-off-by: Sefa Eyeoglu --- pkgs/development/python-modules/pycurl/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/pycurl/default.nix b/pkgs/development/python-modules/pycurl/default.nix index e37e001a3419..c9fd2a8d43f2 100644 --- a/pkgs/development/python-modules/pycurl/default.nix +++ b/pkgs/development/python-modules/pycurl/default.nix @@ -11,6 +11,7 @@ flaky, flask, numpy, + websockets, setuptools, }: @@ -50,6 +51,7 @@ buildPythonPackage rec { flaky flask numpy + websockets pytestCheckHook ]; From d97307b76f4898528c59c895e86412d9607a9436 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Fri, 26 Jun 2026 11:31:34 -0400 Subject: [PATCH 5/5] python3Packages.pycurl: add support for curl 8.21.0 websockets Backport of https://github.com/pycurl/pycurl/pull/1028 Seems like a new release of pycurl is also imminent, which means we may be able to drop this patch soon. Signed-off-by: Sefa Eyeoglu --- pkgs/development/python-modules/pycurl/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/python-modules/pycurl/default.nix b/pkgs/development/python-modules/pycurl/default.nix index c9fd2a8d43f2..c7c32e9e20d3 100644 --- a/pkgs/development/python-modules/pycurl/default.nix +++ b/pkgs/development/python-modules/pycurl/default.nix @@ -4,6 +4,7 @@ buildPythonPackage, isPyPy, fetchFromGitHub, + fetchpatch2, curl, openssl, bottle, @@ -29,6 +30,14 @@ buildPythonPackage rec { hash = "sha256-F40bJ7TYFK2dVkDJGGxl7XV46fKmjwvUYYulcwGL6hk="; }; + patches = [ + (fetchpatch2 { + name = "pycurl-curl-8.21.0-ws-support.patch"; + url = "https://github.com/pycurl/pycurl/commit/c78fd8aba82e2f8037275063138eaa7706c111af.diff?full_index=1"; + hash = "sha256-EBXgGiaMtXTsgJOOrzzZFJ7Q/ofAlc4zuipoEpfdFqU="; + }) + ]; + preConfigure = '' substituteInPlace setup.py \ --replace-fail '--static-libs' '--libs'