2019-09-16 21:29:34 +01:00
|
|
|
{ stdenv, buildPythonPackage, fetchFromGitHub
|
|
|
|
, aiohttp
|
2018-12-01 10:50:54 +00:00
|
|
|
, eventlet
|
|
|
|
, iana-etc
|
|
|
|
, libredirect
|
2019-09-16 21:29:34 +01:00
|
|
|
, mock
|
2019-03-14 11:12:29 +00:00
|
|
|
, requests
|
2019-09-16 21:29:34 +01:00
|
|
|
, six
|
2018-12-01 10:50:54 +00:00
|
|
|
, tornado
|
2019-09-16 21:29:34 +01:00
|
|
|
, websocket_client
|
|
|
|
, websockets
|
2020-09-04 14:50:53 +01:00
|
|
|
, pytestCheckHook
|
2018-12-01 10:50:54 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-engineio";
|
2020-09-04 14:50:53 +01:00
|
|
|
version = "3.13.2";
|
2018-12-01 10:50:54 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "miguelgrinberg";
|
|
|
|
repo = "python-engineio";
|
|
|
|
rev = "v${version}";
|
2020-09-04 14:50:53 +01:00
|
|
|
sha256 = "1hn5nnxp7y2dpf52vrwdxza2sqmzj8admcnwgjkmcxk65s2dhvy1";
|
2018-12-01 10:50:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2019-09-16 21:29:34 +01:00
|
|
|
aiohttp
|
2018-12-01 10:50:54 +00:00
|
|
|
eventlet
|
|
|
|
mock
|
2019-03-14 11:12:29 +00:00
|
|
|
requests
|
2019-09-16 21:29:34 +01:00
|
|
|
tornado
|
|
|
|
websocket_client
|
|
|
|
websockets
|
2020-09-04 14:50:53 +01:00
|
|
|
pytestCheckHook
|
2018-12-01 10:50:54 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = stdenv.lib.optionalString stdenv.isLinux ''
|
2020-09-04 14:50:53 +01:00
|
|
|
echo "nameserver 127.0.0.1" > resolv.conf
|
|
|
|
export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf) \
|
2018-12-01 10:50:54 +00:00
|
|
|
LD_PRELOAD=${libredirect}/lib/libredirect.so
|
|
|
|
'';
|
|
|
|
postCheck = "unset NIX_REDIRECTS LD_PRELOAD";
|
|
|
|
|
2020-09-04 14:50:53 +01:00
|
|
|
# somehow effective log level does not change?
|
|
|
|
disabledTests = [ "test_logger" ];
|
|
|
|
|
2018-12-01 10:50:54 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Engine.IO server";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/miguelgrinberg/python-engineio/";
|
2018-12-01 10:50:54 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.mic92 ];
|
|
|
|
};
|
|
|
|
}
|