2020-11-03 02:18:15 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
2024-04-21 15:54:59 +00:00
|
|
|
, aioresponses
|
2021-01-09 10:05:03 +00:00
|
|
|
, aiosqlite
|
2024-04-21 15:54:59 +00:00
|
|
|
, async-timeout
|
|
|
|
, attrs
|
2020-11-03 02:18:15 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, crccheck
|
2022-05-18 14:49:53 +00:00
|
|
|
, cryptography
|
2020-11-03 02:18:15 +00:00
|
|
|
, fetchFromGitHub
|
2024-04-21 15:54:59 +00:00
|
|
|
, freezegun
|
|
|
|
, importlib-resources
|
|
|
|
, jsonschema
|
2020-11-03 02:18:15 +00:00
|
|
|
, pycryptodome
|
2022-10-06 18:32:54 +00:00
|
|
|
, pyserial-asyncio
|
|
|
|
, pytest-asyncio
|
2021-08-08 23:34:03 +00:00
|
|
|
, pytest-timeout
|
2020-11-03 02:18:15 +00:00
|
|
|
, pytestCheckHook
|
2021-08-08 23:34:03 +00:00
|
|
|
, pythonOlder
|
2023-07-15 17:15:38 +00:00
|
|
|
, setuptools
|
2024-04-21 15:54:59 +00:00
|
|
|
, typing-extensions
|
2021-08-08 23:34:03 +00:00
|
|
|
, voluptuous
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2020-07-18 16:06:22 +00:00
|
|
|
pname = "zigpy";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.63.5";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2023-03-30 22:05:00 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zigpy";
|
|
|
|
repo = "zigpy";
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-iZxHXxheyoA5vo0Pxojs7QE8rSyTpsYpJ6/OzDSZJ20=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-04-21 15:54:59 +00:00
|
|
|
--replace-fail '"setuptools-git-versioning<2"' "" \
|
|
|
|
--replace-fail 'dynamic = ["version"]' 'version = "${version}"'
|
2023-07-15 17:15:38 +00:00
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [
|
2023-07-15 17:15:38 +00:00
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
|
|
|
attrs
|
2020-11-03 02:18:15 +00:00
|
|
|
aiohttp
|
2021-01-09 10:05:03 +00:00
|
|
|
aiosqlite
|
2020-11-03 02:18:15 +00:00
|
|
|
crccheck
|
2022-05-18 14:49:53 +00:00
|
|
|
cryptography
|
2024-04-21 15:54:59 +00:00
|
|
|
jsonschema
|
2022-10-06 18:32:54 +00:00
|
|
|
pyserial-asyncio
|
2024-04-21 15:54:59 +00:00
|
|
|
typing-extensions
|
2020-11-03 02:18:15 +00:00
|
|
|
pycryptodome
|
|
|
|
voluptuous
|
2024-04-21 15:54:59 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.9") [
|
|
|
|
importlib-resources
|
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
|
|
async-timeout
|
2020-11-03 02:18:15 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
aioresponses
|
2022-09-09 14:08:57 +00:00
|
|
|
freezegun
|
2022-10-06 18:32:54 +00:00
|
|
|
pytest-asyncio
|
2021-08-08 23:34:03 +00:00
|
|
|
pytest-timeout
|
2020-11-03 02:18:15 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
disabledTests = [
|
|
|
|
# # Our two manual scans succeeded and the periodic one was attempted
|
|
|
|
# assert len(mock_scan.mock_calls) == 3
|
|
|
|
# AssertionError: assert 4 == 3
|
|
|
|
"test_periodic_scan_priority"
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Tests require network access
|
|
|
|
"tests/ota/test_ota_providers.py"
|
|
|
|
];
|
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"zigpy.application"
|
|
|
|
"zigpy.config"
|
|
|
|
"zigpy.exceptions"
|
|
|
|
"zigpy.types"
|
|
|
|
"zigpy.zcl"
|
|
|
|
];
|
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Library implementing a ZigBee stack";
|
|
|
|
homepage = "https://github.com/zigpy/zigpy";
|
2022-12-02 08:20:57 +00:00
|
|
|
changelog = "https://github.com/zigpy/zigpy/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2022-07-18 16:21:45 +00:00
|
|
|
maintainers = with maintainers; [ mvnetbiz ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|