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