2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPy3k
|
2020-10-07 09:15:18 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, sphinx
|
2020-10-07 09:15:18 +00:00
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "curio";
|
2021-07-04 02:40:35 +00:00
|
|
|
version = "1.5";
|
|
|
|
disabled = !isPy3k;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-07-04 02:40:35 +00:00
|
|
|
sha256 = "sha256-rwghLlkLt9qOTMOcQgEnEUlNwg1iLxYhVbopbMLjvBA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-07-04 02:40:35 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
sphinx
|
2021-03-19 17:17:44 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
disabledTests = [
|
|
|
|
"test_aside_basic" # times out
|
2022-05-18 14:49:53 +00:00
|
|
|
"test_write_timeout" # flaky, does not always time out
|
2020-10-07 09:15:18 +00:00
|
|
|
"test_aside_cancel" # fails because modifies PYTHONPATH and cant find pytest
|
|
|
|
"test_ssl_outgoing" # touches network
|
2022-05-18 14:49:53 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2020-10-07 09:15:18 +00:00
|
|
|
"test_unix_echo" # socket bind error on hydra when built with other packages
|
|
|
|
"test_unix_ssl_server" # socket bind error on hydra when built with other packages
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-04 02:40:35 +00:00
|
|
|
pythonImportsCheck = [ "curio" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/dabeaz/curio";
|
2021-07-04 02:40:35 +00:00
|
|
|
description = "Library for performing concurrent I/O with coroutines in Python";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.marsam ];
|
|
|
|
};
|
|
|
|
}
|