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";
|
2019-11-29 08:05:06 +00:00
|
|
|
version = "3.10.0";
|
2018-12-01 10:50:54 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "miguelgrinberg";
|
|
|
|
repo = "python-engineio";
|
|
|
|
rev = "v${version}";
|
2019-11-29 08:05:06 +00:00
|
|
|
sha256 = "1495r55177c38wq88pb28l50dfd4213iyxwq1k5rmsgp66vww09s";
|
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";
|
2019-04-15 00:25:45 +01:00
|
|
|
homepage = https://github.com/miguelgrinberg/python-engineio/;
|
2018-12-01 10:50:54 +00:00
|
|
|
license = licenses.mit;
|
2019-03-14 11:23:14 +00:00
|
|
|
platforms = platforms.linux;
|
2018-12-01 10:50:54 +00:00
|
|
|
maintainers = [ maintainers.mic92 ];
|
|
|
|
};
|
|
|
|
}
|