2019-05-23 05:23:41 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2021-02-24 16:58:34 +00:00
|
|
|
, fetchpatch
|
2019-05-23 05:23:41 +01:00
|
|
|
, isPy3k
|
2020-09-26 17:30:57 +01:00
|
|
|
, pytestCheckHook
|
2019-05-23 05:23:41 +01:00
|
|
|
, sphinx
|
2020-09-26 17:30:57 +01:00
|
|
|
, stdenv
|
2019-05-23 05:23:41 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "curio";
|
2020-11-29 14:04:26 +00:00
|
|
|
version = "1.4";
|
2019-05-23 05:23:41 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-29 14:04:26 +00:00
|
|
|
sha256 = "57edce81c837f3c2cf42fbb346dee26e537d1659e6605269fb13bd179e068744";
|
2019-05-23 05:23:41 +01:00
|
|
|
};
|
|
|
|
|
2021-02-24 16:58:34 +00:00
|
|
|
patches = [
|
|
|
|
# Fix the flaky test due to slow moving time on Apple Silicon chips.
|
|
|
|
# Remove when https://github.com/dabeaz/curio/pull/339 is in the next release.
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/dabeaz/curio/commit/132376724bbfaa0a52d3d63d0791aa4ac1eb6f5f.patch";
|
|
|
|
sha256 = "sha256-AxO0xRcR9l9/NKEJFwyZIoYcyZxpqOhpdNaeaYokVb4=";
|
|
|
|
})
|
2021-03-03 02:13:32 +00:00
|
|
|
# Same as above
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/dabeaz/curio/commit/8ac2f12a2cdacbc750b01fc7459cee8879bc1ee3.patch";
|
|
|
|
sha256 = "sha256-2Si3fuDLrI09QuzJd1TrE0QY02G9e9m+1eHFTB/MrWU=";
|
|
|
|
})
|
2021-02-24 16:58:34 +00:00
|
|
|
];
|
|
|
|
|
2019-05-23 05:23:41 +01:00
|
|
|
disabled = !isPy3k;
|
|
|
|
|
2020-09-26 17:30:57 +01:00
|
|
|
checkInputs = [ pytestCheckHook sphinx ];
|
2019-05-23 05:23:41 +01:00
|
|
|
|
2019-12-02 23:23:02 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2020-09-26 17:30:57 +01:00
|
|
|
disabledTests = [
|
|
|
|
"test_aside_basic" # times out
|
|
|
|
"test_aside_cancel" # fails because modifies PYTHONPATH and cant find pytest
|
|
|
|
"test_ssl_outgoing" # touches network
|
|
|
|
] ++ lib.optionals (stdenv.isDarwin) [
|
|
|
|
"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
|
|
|
|
];
|
2019-05-23 05:23:41 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/dabeaz/curio";
|
|
|
|
description = "Library for performing concurrent I/O with coroutines in Python 3";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.marsam ];
|
|
|
|
};
|
|
|
|
}
|