Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / libpurecool / default.nix
blobaa523d9a98bf330323498d8774012b0a03cdfb0e
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , netifaces
5 , paho-mqtt
6 , pycryptodome
7 , requests
8 , six
9 , zeroconf
12 buildPythonPackage rec {
13   pname = "libpurecool";
14   version = "0.6.4";
16   src = fetchPypi {
17     inherit pname version;
18     sha256 = "1kwbinbg0i4fca1bpx6jwa1fiw71vg0xa89jhq4pmnl5cn9c8kqx";
19   };
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   '';
28   propagatedBuildInputs = [
29     netifaces
30     paho-mqtt
31     pycryptodome
32     requests
33     six
34     zeroconf
35   ];
37   # Tests are only present in repo, https://github.com/etheralm/libpurecool/issues/36
38   doCheck = false;
39   pythonImportsCheck = [ "libpurecool" ];
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   };