2021-03-09 03:18:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-03-12 07:09:13 +00:00
|
|
|
, base36
|
2022-08-12 12:06:08 +00:00
|
|
|
, chacha20poly1305-reuseable
|
2021-03-09 03:18:52 +00:00
|
|
|
, cryptography
|
|
|
|
, fetchFromGitHub
|
|
|
|
, h11
|
2022-08-12 12:06:08 +00:00
|
|
|
, orjson
|
2021-03-12 07:09:13 +00:00
|
|
|
, pyqrcode
|
2021-03-09 03:18:52 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-timeout
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, zeroconf
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-06-28 23:13:55 +00:00
|
|
|
pname = "hap-python";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "4.7.0";
|
2022-08-12 12:06:08 +00:00
|
|
|
format = "setuptools";
|
2022-12-17 10:02:37 +00:00
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ikalchev";
|
2021-06-28 23:13:55 +00:00
|
|
|
repo = "HAP-python";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-/UBJh1m+WscN9I85/kvlNQnowNybEDyGVuQk4HBDWLE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
chacha20poly1305-reuseable
|
2020-04-24 23:36:52 +00:00
|
|
|
cryptography
|
2021-03-09 03:18:52 +00:00
|
|
|
h11
|
2022-08-12 12:06:08 +00:00
|
|
|
orjson
|
2020-04-24 23:36:52 +00:00
|
|
|
zeroconf
|
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
passthru.optional-dependencies.QRCode = [
|
|
|
|
base36
|
|
|
|
pyqrcode
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-03-09 03:18:52 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-timeout
|
|
|
|
pytestCheckHook
|
2022-08-12 12:06:08 +00:00
|
|
|
]
|
|
|
|
++ passthru.optional-dependencies.QRCode;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-12 07:09:13 +00:00
|
|
|
disabledTestPaths = [
|
2021-08-27 14:25:00 +00:00
|
|
|
# Disable tests requiring network access
|
2021-03-12 07:09:13 +00:00
|
|
|
"tests/test_accessory_driver.py"
|
|
|
|
"tests/test_hap_handler.py"
|
|
|
|
"tests/test_hap_protocol.py"
|
|
|
|
];
|
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
disabledTests = [
|
2021-03-12 07:09:13 +00:00
|
|
|
"test_persist_and_load"
|
|
|
|
"test_we_can_connect"
|
|
|
|
"test_idle_connection_cleanup"
|
2021-03-09 03:18:52 +00:00
|
|
|
"test_we_can_start_stop"
|
2021-03-12 07:09:13 +00:00
|
|
|
"test_push_event"
|
2021-04-08 16:26:57 +00:00
|
|
|
"test_bridge_run_stop"
|
2021-08-27 14:25:00 +00:00
|
|
|
"test_migration_to_include_client_properties"
|
2021-01-05 17:05:55 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pyhap"
|
|
|
|
];
|
2021-08-27 14:25:00 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2022-12-17 10:02:37 +00:00
|
|
|
description = "HomeKit Accessory Protocol implementation";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/ikalchev/HAP-python";
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://github.com/ikalchev/HAP-python/blob/${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ oro ];
|
|
|
|
};
|
|
|
|
}
|