1{ stdenv, buildPythonPackage, isPy3k, fetchFromGitHub, requests, zeroconf, netifaces, pytest }:
2
3buildPythonPackage rec {
4 pname = "netdisco";
5 version = "2.0.0";
6
7 disabled = !isPy3k;
8
9 # PyPI is missing tests/ directory
10 src = fetchFromGitHub {
11 owner = "home-assistant";
12 repo = pname;
13 rev = version;
14 sha256 = "08x5ab7v6a20753y9br7pvfm6a054ywn7y7gh6fydqski0gad6l7";
15 };
16
17 propagatedBuildInputs = [ requests zeroconf netifaces ];
18
19 checkInputs = [ pytest ];
20
21 checkPhase = ''
22 py.test
23 '';
24
25 meta = with stdenv.lib; {
26 description = "Python library to scan local network for services and devices";
27 homepage = https://github.com/home-assistant/netdisco;
28 license = licenses.asl20;
29 platforms = platforms.unix;
30 maintainers = with maintainers; [ dotlambda ];
31 };
32}