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
|
|
|
|
, ed25519
|
|
|
|
, 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 11:17:50 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "HAP-python";
|
2021-04-01 12:46:49 +01:00
|
|
|
version = "3.4.1";
|
2021-03-04 14:28:39 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
2020-04-10 11:17:50 +01:00
|
|
|
|
|
|
|
# pypi package does not include tests
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ikalchev";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-04-01 12:46:49 +01:00
|
|
|
sha256 = "sha256-tZ6Zwlx5J62Xqpxxmt8Phdd9ngtKYhP/p3uor1dRfK8=";
|
2020-04-10 11:17:50 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-03-09 01:58:19 +00:00
|
|
|
base36
|
2020-04-10 11:17:50 +01:00
|
|
|
cryptography
|
2021-03-04 14:28:39 +00:00
|
|
|
curve25519-donna
|
2020-04-10 11:17:50 +01:00
|
|
|
ecdsa
|
2021-03-04 14:28:39 +00:00
|
|
|
ed25519
|
|
|
|
h11
|
2021-03-09 01:58:19 +00:00
|
|
|
pyqrcode
|
2020-04-10 11:17:50 +01:00
|
|
|
zeroconf
|
|
|
|
];
|
|
|
|
|
2021-03-04 14:28:39 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-timeout
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-10 11:17:50 +01:00
|
|
|
|
2021-03-09 01:58:19 +00:00
|
|
|
# Disable tests requiring network access
|
|
|
|
disabledTestPaths = [
|
|
|
|
"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 12:46:49 +01:00
|
|
|
"test_bridge_run_stop"
|
2020-12-30 15:13:05 +00:00
|
|
|
];
|
2020-04-10 11:17:50 +01: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 ];
|
|
|
|
};
|
|
|
|
}
|