1{ stdenv, buildPythonPackage, isPy3k, fetchFromGitHub, requests, zeroconf, netifaces, pytest }: 2 3buildPythonPackage rec { 4 pname = "netdisco"; 5 version = "1.2.4"; 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 = "170s9py8rw07cfgwvv7mf69g8jjg32m2rgw8x3kbvjqlmrdijxmm"; 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}