ch9344: 2.0 -> 0-unstable-2024-11-15 (#354536)
[NixPkgs.git] / pkgs / development / python-modules / libpurecool / default.nix
blob5564bb1d22a7f96deecd5c72f8a761d1580ddebe
2   lib,
3   buildPythonPackage,
4   fetchPypi,
5   setuptools,
6   netifaces,
7   paho-mqtt,
8   pycryptodome,
9   requests,
10   six,
11   zeroconf,
14 buildPythonPackage rec {
15   pname = "libpurecool";
16   version = "0.6.4";
17   pyproject = true;
19   src = fetchPypi {
20     inherit pname version;
21     sha256 = "1kwbinbg0i4fca1bpx6jwa1fiw71vg0xa89jhq4pmnl5cn9c8kqx";
22   };
24   # Remove vendorized zeroconf, https://github.com/etheralm/libpurecool/issues/33
25   postPatch = ''
26     rm libpurecool/zeroconf.py
27     substituteInPlace libpurecool/dyson_pure_cool_link.py \
28       --replace-fail "from .zeroconf import ServiceBrowser, Zeroconf" "from zeroconf import ServiceBrowser, Zeroconf"
29   '';
31   build-system = [ setuptools ];
33   dependencies = [
34     netifaces
35     paho-mqtt
36     pycryptodome
37     requests
38     six
39     zeroconf
40   ];
42   # Tests are only present in repo, https://github.com/etheralm/libpurecool/issues/36
43   doCheck = false;
44   pythonImportsCheck = [ "libpurecool" ];
46   meta = with lib; {
47     description = "Python library for Dyson devices";
48     homepage = "http://libpurecool.readthedocs.io";
49     license = with licenses; [ asl20 ];
50     maintainers = with maintainers; [ fab ];
51   };