1{ lib 2, buildPythonPackage 3, fetchPypi 4, netifaces 5, paho-mqtt 6, pycryptodome 7, requests 8, six 9, zeroconf 10}: 11 12buildPythonPackage rec { 13 pname = "libpurecool"; 14 version = "0.6.4"; 15 16 src = fetchPypi { 17 inherit pname version; 18 sha256 = "1kwbinbg0i4fca1bpx6jwa1fiw71vg0xa89jhq4pmnl5cn9c8kqx"; 19 }; 20 21 # Remove vendorized zeroconf, https://github.com/etheralm/libpurecool/issues/33 22 postPatch = '' 23 rm libpurecool/zeroconf.py 24 substituteInPlace libpurecool/dyson_pure_cool_link.py \ 25 --replace "from .zeroconf import ServiceBrowser, Zeroconf" "from zeroconf import ServiceBrowser, Zeroconf" 26 ''; 27 28 propagatedBuildInputs = [ 29 netifaces 30 paho-mqtt 31 pycryptodome 32 requests 33 six 34 zeroconf 35 ]; 36 37 # Tests are only present in repo, https://github.com/etheralm/libpurecool/issues/36 38 doCheck = false; 39 pythonImportsCheck = [ "libpurecool" ]; 40 41 meta = with lib; { 42 description = "Python library for Dyson devices"; 43 homepage = "http://libpurecool.readthedocs.io"; 44 license = with licenses; [ asl20 ]; 45 maintainers = with maintainers; [ fab ]; 46 }; 47}