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