1{ stdenv
2, buildPythonPackage
3, fetchPypi
4, ifaddr
5, typing
6, isPy27
7, pythonOlder
8, python
9}:
10
11buildPythonPackage rec {
12 pname = "zeroconf";
13 version = "0.21.3";
14 disabled = isPy27;
15
16 src = fetchPypi {
17 inherit pname version;
18 sha256 = "5b52dfdf4e665d98a17bf9aa50dea7a8c98e25f972d9c1d7660e2b978a1f5713";
19 };
20
21 propagatedBuildInputs = [ ifaddr ]
22 ++ stdenv.lib.optionals (pythonOlder "3.5") [ typing ];
23
24 # tests not included with pypi release
25 doCheck = false;
26
27 checkPhase = ''
28 ${python.interpreter} test_zeroconf.py
29 '';
30
31 meta = with stdenv.lib; {
32 description = "A pure python implementation of multicast DNS service discovery";
33 homepage = https://github.com/jstasiak/python-zeroconf;
34 license = licenses.lgpl21;
35 maintainers = with maintainers; [ abbradar ];
36 };
37}