summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-rabbitair/default.nix
blob: bc6702cae4416d22bf84a8c41d784fbc883651b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
  lib,
  buildPythonPackage,
  cryptography,
  fetchFromGitHub,
  pytest-asyncio,
  pytestCheckHook,
  setuptools,
  zeroconf,
}:

buildPythonPackage rec {
  pname = "python-rabbitair";
  version = "0.0.8";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "rabbit-air";
    repo = "python-rabbitair";
    rev = "v${version}";
    hash = "sha256-CGr7NvnGRNTiKq5BpB/zmfgyd/2ggTbO0nj+Q+MavTs=";
  };

  nativeBuildInputs = [ setuptools ];

  propagatedBuildInputs = [
    cryptography
    zeroconf
  ];

  nativeCheckInputs = [
    pytest-asyncio
    pytestCheckHook
  ];

  pythonImportsCheck = [ "rabbitair" ];

  disabledTests = [
    # Tests require network access
    "test_info"
    "test_no_response"
    "test_protocol_error"
    "test_sequential_requests"
    "test_set_state"
    "test_state_a2"
    "test_state_a3"
    "test_zeroconf"
  ];

  meta = {
    description = "Module for the control of Rabbit Air air purifiers";
    homepage = "https://github.com/rabbit-air/python-rabbitair";
    license = with lib.licenses; [ asl20 ];
    maintainers = with lib.maintainers; [ fab ];
  };
}