summary refs log tree commit diff
path: root/pkgs/development/python-modules/HAP-python/default.nix
blob: 2e740fcc2c86c0ddb757ab051cb81d0ca049ef1e (plain) (blame)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
{ lib
, buildPythonPackage
, cryptography
, curve25519-donna
, ecdsa
, ed25519
, fetchFromGitHub
, h11
, pytest-asyncio
, pytest-timeout
, pytestCheckHook
, pythonOlder
, zeroconf
}:

buildPythonPackage rec {
  pname = "HAP-python";
  version = "3.3.2";
  disabled = pythonOlder "3.5";

  # pypi package does not include tests
  src = fetchFromGitHub {
    owner = "ikalchev";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-oDTyFIhf7oogYyh9LpmVtagi1kDXLCc/7c2UH1dL2Sg=";
  };

  propagatedBuildInputs = [
    cryptography
    curve25519-donna
    ecdsa
    ed25519
    h11
    zeroconf
  ];

  checkInputs = [
    pytest-asyncio
    pytest-timeout
    pytestCheckHook
  ];

  disabledTests = [
    # Disable tests needing network
    "camera"
    "pair"
    "test_async_subscribe_client_topic"
    "test_auto_add_aid_mac"
    "test_connection_management"
    "test_crypto_failure_closes_connection"
    "test_empty_encrypted_data"
    "test_external_zeroconf"
    "test_get_accessories"
    "test_get_characteristics"
    "test_handle_set_handle_set"
    "test_handle_snapshot_encrypted_non_existant_accessory"
    "test_http_11_keep_alive"
    "test_http10_close"
    "test_mdns_service_info"
    "test_mixing_service_char_callbacks_partial_failure"
    "test_not_standalone_aid"
    "test_persist"
    "test_push_event"
    "test_send_events"
    "test_service_callbacks"
    "test_set_characteristics_with_crypto"
    "test_setup_endpoints"
    "test_start"
    "test_upgrade_to_encrypted"
    "test_we_can_start_stop"
    "test_xhm_uri"
  ];

  meta = with lib; {
    homepage = "https://github.com/ikalchev/HAP-python";
    description = "HomeKit Accessory Protocol implementation in python";
    license = licenses.asl20;
    maintainers = with maintainers; [ oro ];
  };
}