From 79d9ef8a93be99bca1ee66eb53388e0cfbc3ea68 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 1 May 2022 08:19:53 +0100 Subject: [PATCH] python3Packages.pycurl: pull fix for curl 7.83.0 Without the change `python3Packages.pycurl` tests fail on `staging`: $ nix build -f. -L python3Packages.pycurl ... python3.9-pycurl> tests/error_test.py F..F [ 12%] ... python3.9-pycurl> > self.assertEqual('No URL set!', msg) python3.9-pycurl> E AssertionError: 'No URL set!' != 'No URL set' python3.9-pycurl> E - No URL set! python3.9-pycurl> E ? - python3.9-pycurl> E + No URL set python3.9-pycurl> tests/error_test.py:32: AssertionError --- pkgs/development/python-modules/pycurl/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/development/python-modules/pycurl/default.nix b/pkgs/development/python-modules/pycurl/default.nix index e7f3b87ad0c3..4b0e215f22c1 100644 --- a/pkgs/development/python-modules/pycurl/default.nix +++ b/pkgs/development/python-modules/pycurl/default.nix @@ -2,6 +2,7 @@ , buildPythonPackage , isPyPy , fetchPypi +, fetchpatch , pythonOlder , curl , openssl @@ -20,6 +21,16 @@ buildPythonPackage rec { sha256 = "sha256-qGOtGP9Hj1VFkkBXiHza5CLhsnRuQWdGFfaHSY6luIo="; }; + patches = [ + # Pull upstream patch for curl-3.83: + # https://github.com/pycurl/pycurl/pull/753 + (fetchpatch { + name = "curl-3.83.patch"; + url = "https://github.com/pycurl/pycurl/commit/d47c68b1364f8a1a45ab8c584c291d44b762f7b1.patch"; + sha256 = "sha256-/lGq7O7ZyytzBAxWJPigcWdvypM7OHLBcp9ItmX7z1g="; + }) + ]; + preConfigure = '' substituteInPlace setup.py --replace '--static-libs' '--libs' export PYCURL_SSL_LIBRARY=openssl