2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2021-01-09 10:05:03 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, aiohttp
|
|
|
|
, eventlet
|
|
|
|
, iana-etc
|
|
|
|
, libredirect
|
|
|
|
, mock
|
|
|
|
, requests
|
|
|
|
, six
|
|
|
|
, tornado
|
2021-06-28 23:13:55 +00:00
|
|
|
, websocket-client
|
2020-04-24 23:36:52 +00:00
|
|
|
, websockets
|
2020-09-25 04:45:31 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-engineio";
|
2021-10-01 09:20:50 +00:00
|
|
|
version = "4.2.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "miguelgrinberg";
|
|
|
|
repo = "python-engineio";
|
|
|
|
rev = "v${version}";
|
2021-10-01 09:20:50 +00:00
|
|
|
sha256 = "sha256-aAoTeQZCtxddVBPwlyv2j4aACMO9p0vQ/ESkkv4E3VE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
aiohttp
|
|
|
|
eventlet
|
|
|
|
mock
|
|
|
|
requests
|
|
|
|
tornado
|
2021-06-28 23:13:55 +00:00
|
|
|
websocket-client
|
2020-04-24 23:36:52 +00:00
|
|
|
websockets
|
2020-09-25 04:45:31 +00:00
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
preCheck = lib.optionalString stdenv.isLinux ''
|
2020-09-25 04:45:31 +00:00
|
|
|
echo "nameserver 127.0.0.1" > resolv.conf
|
|
|
|
export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf) \
|
2020-04-24 23:36:52 +00:00
|
|
|
LD_PRELOAD=${libredirect}/lib/libredirect.so
|
|
|
|
'';
|
|
|
|
postCheck = "unset NIX_REDIRECTS LD_PRELOAD";
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
# somehow effective log level does not change?
|
|
|
|
disabledTests = [ "test_logger" ];
|
2021-01-09 10:05:03 +00:00
|
|
|
pythonImportsCheck = [ "engineio" ];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-01-09 10:05:03 +00:00
|
|
|
description = "Python based Engine.IO client and server";
|
|
|
|
longDescription = ''
|
|
|
|
Engine.IO is a lightweight transport protocol that enables real-time
|
|
|
|
bidirectional event-based communication between clients and a server.
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/miguelgrinberg/python-engineio/";
|
2021-01-09 10:05:03 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ mic92 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|