summary refs log tree commit diff
path: root/pkgs/development/python-modules/uvloop/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/uvloop/default.nix')
-rw-r--r--pkgs/development/python-modules/uvloop/default.nix18
1 files changed, 12 insertions, 6 deletions
diff --git a/pkgs/development/python-modules/uvloop/default.nix b/pkgs/development/python-modules/uvloop/default.nix
index ec7f3e47ca7..c3b637da067 100644
--- a/pkgs/development/python-modules/uvloop/default.nix
+++ b/pkgs/development/python-modules/uvloop/default.nix
@@ -6,7 +6,7 @@
 , libuv
 , CoreServices
 , ApplicationServices
-# Check Inputs
+  # Check Inputs
 , aiohttp
 , psutil
 , pyopenssl
@@ -34,7 +34,6 @@ buildPythonPackage rec {
   checkInputs = [
     aiohttp
     pytestCheckHook
-    pyopenssl
     psutil
   ];
 
@@ -46,15 +45,18 @@ buildPythonPackage rec {
     "--assert=plain"
     "--strict"
     "--tb=native"
+    # Depend on pyopenssl
+    "--deselect tests/test_tcp.py::Test_UV_TCPSSL::test_flush_before_shutdown"
+    "--deselect tests/test_tcp.py::Test_UV_TCPSSL::test_renegotiation"
   ] ++ lib.optionals (stdenv.isAarch32 || stdenv.isAarch64) [
     # test gets stuck in epoll_pwait on hydras aarch64 builders
     # https://github.com/MagicStack/uvloop/issues/412
-    "--deselect" "tests/test_tcp.py::Test_AIO_TCPSSL::test_remote_shutdown_receives_trailing_data"
+    "--deselect tests/test_tcp.py::Test_AIO_TCPSSL::test_remote_shutdown_receives_trailing_data"
   ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
     # Flaky test: https://github.com/MagicStack/uvloop/issues/412
-    "--deselect" "tests/test_tcp.py::Test_UV_TCPSSL::test_shutdown_timeout_handler_not_set"
+    "--deselect tests/test_tcp.py::Test_UV_TCPSSL::test_shutdown_timeout_handler_not_set"
     # Broken: https://github.com/NixOS/nixpkgs/issues/160904
-    "--deselect" "tests/test_context.py::Test_UV_Context::test_create_ssl_server_manual_connection_lost"
+    "--deselect tests/test_context.py::Test_UV_Context::test_create_ssl_server_manual_connection_lost"
   ];
 
   disabledTestPaths = [
@@ -66,7 +68,11 @@ buildPythonPackage rec {
     # Work around "OSError: AF_UNIX path too long"
     # https://github.com/MagicStack/uvloop/issues/463
     export TMPDIR="/tmp"
-   '' + ''
+  '' + ''
+    # pyopenssl is not well supported by upstream
+    # https://github.com/NixOS/nixpkgs/issues/175875
+    substituteInPlace tests/test_tcp.py \
+      --replace "from OpenSSL import SSL as openssl_ssl" ""
     # force using installed/compiled uvloop vs source by moving tests to temp dir
     export TEST_DIR=$(mktemp -d)
     cp -r tests $TEST_DIR