Files
nixpkgs/pkgs/development/python-modules/HAP-python/default.nix
T

70 lines
1.3 KiB
Nix
Raw Normal View History

2021-03-04 15:28:39 +01:00
{ lib
, buildPythonPackage
2021-03-09 02:58:19 +01:00
, base36
2021-03-04 15:28:39 +01:00
, cryptography
, curve25519-donna
, ecdsa
, ed25519
, fetchFromGitHub
, h11
2021-03-09 02:58:19 +01:00
, pyqrcode
2021-03-04 15:28:39 +01:00
, pytest-asyncio
, pytest-timeout
, pytestCheckHook
, pythonOlder
, zeroconf
}:
2020-04-10 12:17:50 +02:00
buildPythonPackage rec {
pname = "HAP-python";
2021-03-09 02:58:19 +01:00
version = "3.4.0";
2021-03-04 15:28:39 +01:00
disabled = pythonOlder "3.5";
2020-04-10 12:17:50 +02:00
# pypi package does not include tests
src = fetchFromGitHub {
owner = "ikalchev";
repo = pname;
rev = "v${version}";
2021-03-09 02:58:19 +01:00
sha256 = "0mkrs3fwiyp4am9fx1dnhd9h7rphfwymr46khw40xavrfb5jmsa7";
2020-04-10 12:17:50 +02:00
};
propagatedBuildInputs = [
2021-03-09 02:58:19 +01:00
base36
2020-04-10 12:17:50 +02:00
cryptography
2021-03-04 15:28:39 +01:00
curve25519-donna
2020-04-10 12:17:50 +02:00
ecdsa
2021-03-04 15:28:39 +01:00
ed25519
h11
2021-03-09 02:58:19 +01:00
pyqrcode
2020-04-10 12:17:50 +02:00
zeroconf
];
2021-03-04 15:28:39 +01:00
checkInputs = [
pytest-asyncio
pytest-timeout
pytestCheckHook
];
2020-04-10 12:17:50 +02:00
2021-03-09 02:58:19 +01: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 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"
2020-12-30 16:13:05 +01:00
];
2020-04-10 12:17:50 +02: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 ];
};
}