1{ lib, buildPythonPackage, fetchPypi, isPy3k, pythonAtLeast, setuptools
2, transitions, websockets, passlib, docopt, pyyaml, nose }:
3
4buildPythonPackage rec {
5 pname = "hbmqtt";
6 version = "0.9.6";
7
8 # https://github.com/beerfactory/hbmqtt/issues/223
9 disabled = !isPy3k || pythonAtLeast "3.9";
10
11 src = fetchPypi {
12 inherit pname version;
13 sha256 = "1n9c8yj11npiq9qxivwmfhib1qkjpcyw42a7q0w641bdrz3x6r37";
14 };
15
16 propagatedBuildInputs = [
17 transitions websockets passlib docopt pyyaml setuptools
18 ];
19
20 postPatch = ''
21 # test tries to bind same port multiple times and fails
22 rm tests/test_client.py
23 '';
24
25 checkInputs = [ nose ];
26
27 checkPhase = ''
28 nosetests -e test_connect_tcp
29 '';
30
31 meta = with lib; {
32 homepage = "https://github.com/beerfactory/hbmqtt";
33 description = "MQTT client/broker using Python asynchronous I/O";
34 license = licenses.mit;
35 maintainers = with maintainers; [ dotlambda ];
36 };
37}