diff options
Diffstat (limited to 'pkgs/development/python-modules/twisted/default.nix')
-rw-r--r-- | pkgs/development/python-modules/twisted/default.nix | 59 |
1 files changed, 34 insertions, 25 deletions
diff --git a/pkgs/development/python-modules/twisted/default.nix b/pkgs/development/python-modules/twisted/default.nix index ffeee44aa8c7..6a6b752ab8a2 100644 --- a/pkgs/development/python-modules/twisted/default.nix +++ b/pkgs/development/python-modules/twisted/default.nix @@ -73,6 +73,13 @@ buildPythonPackage rec { url = "https://github.com/mweinelt/twisted/commit/e69e652de671aac0abf5c7e6c662fc5172758c5a.patch"; hash = "sha256-LmvKUTViZoY/TPBmSlx4S9FbJNZfB5cxzn/YcciDmoI="; }) + + (fetchpatch { + name = "python-3.12.6.patch"; + url = "https://github.com/twisted/twisted/commit/3422f7988e3d42e6e5184acd65f103fd28750648.patch"; + excludes = [ ".github/workflows/test.yaml" ]; + hash = "sha256-/UmrHdWaApytkEDZiISjPGzpWv/Yxe/xjvr9GOjMPmQ="; + }) ]; __darwinAllowLocalNetworking = true; @@ -138,7 +145,7 @@ buildPythonPackage rec { substituteInPlace src/twisted/test/test_failure.py \ --replace "from cython_test_exception_raiser import raiser # type: ignore[import]" "raiser = None" '' - + lib.optionalString stdenv.isLinux '' + + lib.optionalString stdenv.hostPlatform.isLinux '' echo 'PTYProcessTestsBuilder_EPollReactorTests.test_openFileDescriptors.skip = "invalid syntax"'>> src/twisted/internet/test/test_process.py echo 'PTYProcessTestsBuilder_PollReactorTests.test_openFileDescriptors.skip = "invalid syntax"'>> src/twisted/internet/test/test_process.py echo 'UNIXTestsBuilder_EPollReactorTests.test_sendFileDescriptorTriggersPauseProducing.skip = "sendFileDescriptor producer was not paused"'>> src/twisted/internet/test/test_unix.py @@ -149,7 +156,7 @@ buildPythonPackage rec { substituteInPlace src/twisted/python/_inotify.py --replace \ "ctypes.util.find_library(\"c\")" "'${stdenv.cc.libc}/lib/libc.so.6'" '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' echo 'ProcessTestsBuilder_AsyncioSelectorReactorTests.test_openFileDescriptors.skip = "invalid syntax"'>> src/twisted/internet/test/test_process.py echo 'ProcessTestsBuilder_SelectReactorTests.test_openFileDescriptors.skip = "invalid syntax"'>> src/twisted/internet/test/test_process.py echo 'ProcessTestsBuilder_AsyncioSelectorReactorTests.test_processEnded.skip = "exit code 120"' >> src/twisted/internet/test/test_process.py @@ -171,11 +178,13 @@ buildPythonPackage rec { hypothesis pyhamcrest ] - ++ passthru.optional-dependencies.conch - ++ passthru.optional-dependencies.http2 - ++ passthru.optional-dependencies.serial + ++ optional-dependencies.conch + ++ optional-dependencies.http2 + ++ optional-dependencies.serial # not supported on aarch64-darwin: https://github.com/pyca/pyopenssl/issues/873 - ++ lib.optionals (!(stdenv.isDarwin && stdenv.isAarch64)) passthru.optional-dependencies.tls; + ++ lib.optionals ( + !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) + ) optional-dependencies.tls; checkPhase = '' export SOURCE_DATE_EPOCH=315532800 @@ -184,26 +193,26 @@ buildPythonPackage rec { ${python.interpreter} -m twisted.trial -j1 twisted ''; - passthru = { - optional-dependencies = { - conch = [ - appdirs - bcrypt - cryptography - pyasn1 - ]; - http2 = [ - h2 - priority - ]; - serial = [ pyserial ]; - tls = [ - idna - pyopenssl - service-identity - ]; - }; + optional-dependencies = { + conch = [ + appdirs + bcrypt + cryptography + pyasn1 + ]; + http2 = [ + h2 + priority + ]; + serial = [ pyserial ]; + tls = [ + idna + pyopenssl + service-identity + ]; + }; + passthru = { tests = { inherit cassandra-driver |