2021-03-04 14:28:39 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-03-09 01:58:19 +00:00
|
|
|
, base36
|
2021-03-04 14:28:39 +00:00
|
|
|
, cryptography
|
|
|
|
, curve25519-donna
|
|
|
|
, ecdsa
|
|
|
|
, fetchFromGitHub
|
|
|
|
, h11
|
2021-03-09 01:58:19 +00:00
|
|
|
, pyqrcode
|
2021-03-04 14:28:39 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-timeout
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, zeroconf
|
|
|
|
}:
|
2020-04-10 10:17:50 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-06-01 10:23:40 +00:00
|
|
|
pname = "hap-python";
|
2022-01-18 08:30:52 +00:00
|
|
|
version = "4.4.0";
|
2021-07-05 07:01:10 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-10 10:17:50 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ikalchev";
|
2021-06-01 10:23:40 +00:00
|
|
|
repo = "HAP-python";
|
2020-04-10 10:17:50 +00:00
|
|
|
rev = "v${version}";
|
2022-01-18 08:30:52 +00:00
|
|
|
sha256 = "sha256-dSiI2W4U4FYwMRBInpxb/wkQLKxPzLHIkLPNgiZEhUA=";
|
2020-04-10 10:17:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-03-09 01:58:19 +00:00
|
|
|
base36
|
2020-04-10 10:17:50 +00:00
|
|
|
cryptography
|
2021-03-04 14:28:39 +00:00
|
|
|
curve25519-donna
|
2020-04-10 10:17:50 +00:00
|
|
|
ecdsa
|
2021-03-04 14:28:39 +00:00
|
|
|
h11
|
2021-03-09 01:58:19 +00:00
|
|
|
pyqrcode
|
2020-04-10 10:17:50 +00:00
|
|
|
zeroconf
|
|
|
|
];
|
|
|
|
|
2021-03-04 14:28:39 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-timeout
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-10 10:17:50 +00:00
|
|
|
|
2021-03-09 01:58:19 +00:00
|
|
|
disabledTestPaths = [
|
2021-08-24 21:14:44 +00:00
|
|
|
# Disable tests requiring network access
|
2021-03-09 01:58:19 +00:00
|
|
|
"tests/test_accessory_driver.py"
|
|
|
|
"tests/test_hap_handler.py"
|
|
|
|
"tests/test_hap_protocol.py"
|
|
|
|
];
|
|
|
|
|
2020-12-30 15:13:05 +00:00
|
|
|
disabledTests = [
|
2021-03-09 01:58:19 +00:00
|
|
|
"test_persist_and_load"
|
|
|
|
"test_we_can_connect"
|
|
|
|
"test_idle_connection_cleanup"
|
2021-03-04 14:28:39 +00:00
|
|
|
"test_we_can_start_stop"
|
2021-03-09 01:58:19 +00:00
|
|
|
"test_push_event"
|
2021-04-01 11:46:49 +00:00
|
|
|
"test_bridge_run_stop"
|
2021-08-24 21:14:44 +00:00
|
|
|
"test_migration_to_include_client_properties"
|
2020-12-30 15:13:05 +00:00
|
|
|
];
|
2020-04-10 10:17:50 +00:00
|
|
|
|
2021-08-24 21:14:44 +00:00
|
|
|
pythonImportsCheck = [ "pyhap" ];
|
|
|
|
|
2020-04-10 10:17:50 +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 ];
|
|
|
|
};
|
|
|
|
}
|