2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, aiohttp
|
2021-12-06 16:07:01 +00:00
|
|
|
, buildPythonPackage
|
2020-04-24 23:36:52 +00:00
|
|
|
, eventlet
|
2021-12-06 16:07:01 +00:00
|
|
|
, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, iana-etc
|
|
|
|
, libredirect
|
|
|
|
, mock
|
2021-12-06 16:07:01 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, requests
|
|
|
|
, tornado
|
2021-06-28 23:13:55 +00:00
|
|
|
, websocket-client
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-engineio";
|
2023-03-30 22:05:00 +00:00
|
|
|
version = "4.4.0";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "miguelgrinberg";
|
|
|
|
repo = "python-engineio";
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-30 22:05:00 +00:00
|
|
|
hash = "sha256-pixLk9Q7mIw1ReFemDu039lJtCwqi73tvhXl0KhKvgw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-04-24 23:36:52 +00:00
|
|
|
aiohttp
|
|
|
|
eventlet
|
|
|
|
mock
|
|
|
|
requests
|
|
|
|
tornado
|
2021-06-28 23:13:55 +00:00
|
|
|
websocket-client
|
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
|
|
|
|
'';
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
postCheck = ''
|
|
|
|
unset NIX_REDIRECTS LD_PRELOAD
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
# somehow effective log level does not change?
|
2021-12-06 16:07:01 +00:00
|
|
|
disabledTests = [
|
|
|
|
"test_logger"
|
|
|
|
];
|
|
|
|
|
|
|
|
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/";
|
2022-12-28 21:21:41 +00:00
|
|
|
changelog = "https://github.com/miguelgrinberg/python-engineio/blob/v${version}/CHANGES.md";
|
2021-01-09 10:05:03 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ mic92 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|