2021-03-04 15:28:39 +01:00
|
|
|
{
|
|
|
|
lib,
|
2023-08-02 19:57:15 +02:00
|
|
|
async-timeout,
|
2021-03-04 15:28:39 +01:00
|
|
|
buildPythonPackage,
|
2021-03-09 02:58:19 +01:00
|
|
|
base36,
|
2022-07-16 12:59:11 +02:00
|
|
|
chacha20poly1305-reuseable,
|
2021-03-04 15:28:39 +01:00
|
|
|
cryptography,
|
|
|
|
fetchFromGitHub,
|
|
|
|
h11,
|
2022-07-16 12:59:11 +02:00
|
|
|
orjson,
|
2021-03-09 02:58:19 +01:00
|
|
|
pyqrcode,
|
2021-03-04 15:28:39 +01:00
|
|
|
pytest-asyncio,
|
|
|
|
pytest-timeout,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2024-11-04 09:08:31 +01:00
|
|
|
setuptools,
|
2021-03-04 15:28:39 +01:00
|
|
|
zeroconf,
|
|
|
|
}:
|
2020-04-10 12:17:50 +02:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-06-01 12:23:40 +02:00
|
|
|
pname = "hap-python";
|
2024-11-03 15:19:59 +00:00
|
|
|
version = "4.9.2";
|
2024-11-04 09:08:31 +01:00
|
|
|
pyproject = true;
|
2022-12-10 22:28:24 +01:00
|
|
|
|
2024-11-04 09:08:31 +01:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-10 12:17:50 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ikalchev";
|
2021-06-01 12:23:40 +02:00
|
|
|
repo = "HAP-python";
|
2025-01-03 21:24:13 +01:00
|
|
|
tag = version;
|
2024-11-03 15:19:59 +00:00
|
|
|
hash = "sha256-mBjVUfNHuGSeLRisqu9ALpTDwpxHir+6X0scq+HrzxA=";
|
2020-04-10 12:17:50 +02:00
|
|
|
};
|
|
|
|
|
2024-11-04 09:08:31 +01:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [
|
2023-08-02 19:57:15 +02:00
|
|
|
async-timeout
|
2022-07-16 12:59:11 +02:00
|
|
|
chacha20poly1305-reuseable
|
2020-04-10 12:17:50 +02:00
|
|
|
cryptography
|
2021-03-04 15:28:39 +01:00
|
|
|
h11
|
2022-07-16 12:59:11 +02:00
|
|
|
orjson
|
2020-04-10 12:17:50 +02:00
|
|
|
zeroconf
|
|
|
|
];
|
|
|
|
|
2024-09-28 22:35:45 -07:00
|
|
|
optional-dependencies.QRCode = [
|
2022-07-16 12:59:11 +02:00
|
|
|
base36
|
|
|
|
pyqrcode
|
|
|
|
];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2021-03-04 15:28:39 +01:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-timeout
|
|
|
|
pytestCheckHook
|
2024-09-28 22:35:45 -07:00
|
|
|
] ++ optional-dependencies.QRCode;
|
2020-04-10 12:17:50 +02:00
|
|
|
|
2021-03-09 02:58:19 +01:00
|
|
|
disabledTestPaths = [
|
2021-08-24 23:14:44 +02:00
|
|
|
# Disable tests requiring network access
|
2021-03-09 02:58:19 +01:00
|
|
|
"tests/test_accessory_driver.py"
|
|
|
|
"tests/test_hap_handler.py"
|
|
|
|
"tests/test_hap_protocol.py"
|
|
|
|
];
|
|
|
|
|
2020-12-30 16:13:05 +01:00
|
|
|
disabledTests = [
|
2021-03-09 02:58:19 +01:00
|
|
|
"test_persist_and_load"
|
|
|
|
"test_we_can_connect"
|
|
|
|
"test_idle_connection_cleanup"
|
2021-03-04 15:28:39 +01:00
|
|
|
"test_we_can_start_stop"
|
2021-03-09 02:58:19 +01:00
|
|
|
"test_push_event"
|
2021-04-01 13:46:49 +02:00
|
|
|
"test_bridge_run_stop"
|
2021-08-24 23:14:44 +02:00
|
|
|
"test_migration_to_include_client_properties"
|
2020-12-30 16:13:05 +01:00
|
|
|
];
|
2020-04-10 12:17:50 +02:00
|
|
|
|
2022-12-10 22:28:24 +01:00
|
|
|
pythonImportsCheck = [ "pyhap" ];
|
2021-08-24 23:14:44 +02:00
|
|
|
|
2020-04-10 12:17:50 +02:00
|
|
|
meta = with lib; {
|
2022-12-10 22:28:24 +01:00
|
|
|
description = "HomeKit Accessory Protocol implementation";
|
2020-04-10 12:17:50 +02:00
|
|
|
homepage = "https://github.com/ikalchev/HAP-python";
|
2023-06-19 17:47:28 +02:00
|
|
|
changelog = "https://github.com/ikalchev/HAP-python/blob/${version}/CHANGELOG.md";
|
2020-04-10 12:17:50 +02:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ oro ];
|
|
|
|
};
|
|
|
|
}
|