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
|
2018-12-01 10:50:54 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-engineio";
|
2020-06-19 09:13:00 +01:00
|
|
|
version = "3.13.0";
|
2018-12-01 10:50:54 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "miguelgrinberg";
|
|
|
|
repo = "python-engineio";
|
|
|
|
rev = "v${version}";
|
2020-06-19 09:13:00 +01:00
|
|
|
sha256 = "1fgfrgcvjg3fyza5lhl1l9cfq073xrwwhh3xs178csrjz4s8s378";
|
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
|
2018-12-01 10:50:54 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# make /etc/protocols accessible to fix socket.getprotobyname('tcp') in sandbox
|
|
|
|
preCheck = stdenv.lib.optionalString stdenv.isLinux ''
|
|
|
|
export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols \
|
|
|
|
LD_PRELOAD=${libredirect}/lib/libredirect.so
|
|
|
|
'';
|
|
|
|
postCheck = "unset NIX_REDIRECTS LD_PRELOAD";
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|