2018-12-01 10:50:54 +00:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, six
|
|
|
|
, eventlet
|
|
|
|
, mock
|
|
|
|
, iana-etc
|
|
|
|
, libredirect
|
|
|
|
, aiohttp
|
2019-03-14 11:12:29 +00:00
|
|
|
, websockets
|
|
|
|
, websocket_client
|
|
|
|
, requests
|
2018-12-01 10:50:54 +00:00
|
|
|
, tornado
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-engineio";
|
2019-03-14 11:12:29 +00:00
|
|
|
version = "3.4.3";
|
2018-12-01 10:50:54 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "miguelgrinberg";
|
|
|
|
repo = "python-engineio";
|
|
|
|
rev = "v${version}";
|
2019-03-14 11:12:29 +00:00
|
|
|
sha256 = "0wk81rqigw47z087f5kc7b9iwqggypxc62q8q818qyzqwb93ysxf";
|
2018-12-01 10:50:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
eventlet
|
|
|
|
mock
|
|
|
|
aiohttp
|
2019-03-14 11:12:29 +00:00
|
|
|
websockets
|
|
|
|
websocket_client
|
2018-12-01 10:50:54 +00:00
|
|
|
tornado
|
2019-03-14 11:12:29 +00:00
|
|
|
requests
|
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 ];
|
|
|
|
};
|
|
|
|
}
|