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";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "4.5.0";
|
|
|
|
format = "setuptools";
|
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";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "sha256-/XJvCL9hMIrOUwGPcrvSrJ6SZ/E6BQy+isFFlAniIM4=";
|
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
|
|
|
|
];
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
checkInputs = [
|
|
|
|
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
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
pythonImportsCheck = [ "pyhap" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/ikalchev/HAP-python";
|
|
|
|
description = "HomeKit Accessory Protocol implementation in python";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ oro ];
|
|
|
|
};
|
|
|
|
}
|