2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
async-timeout,
|
|
|
|
buildPythonPackage,
|
|
|
|
coloredlogs,
|
|
|
|
fetchFromGitHub,
|
|
|
|
jsonschema,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytest-mock,
|
|
|
|
pytest-rerunfailures,
|
|
|
|
pytest-timeout,
|
|
|
|
pytest-xdist,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
voluptuous,
|
|
|
|
zigpy,
|
2021-05-20 23:08:51 +00:00
|
|
|
}:
|
2020-11-03 02:18:15 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "zigpy-znp";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "0.12.3";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-11-03 02:18:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-05-20 23:08:51 +00:00
|
|
|
owner = "zigpy";
|
|
|
|
repo = pname;
|
2022-07-14 12:49:19 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-qrIYcGumOHu3/gG9MOyKngAhOkeZEmCgXIDDcghoYn0=";
|
2020-11-03 02:18:15 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-01-02 11:29:13 +00:00
|
|
|
--replace "timeout = 20" "timeout = 300" \
|
|
|
|
--replace ', "setuptools-git-versioning<2"' "" \
|
|
|
|
--replace 'dynamic = ["version"]' 'version = "${version}"'
|
2023-04-12 12:48:02 +00:00
|
|
|
'';
|
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
async-timeout
|
|
|
|
coloredlogs
|
2021-05-20 23:08:51 +00:00
|
|
|
jsonschema
|
2020-11-03 02:18:15 +00:00
|
|
|
voluptuous
|
|
|
|
zigpy
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-11-03 02:18:15 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-mock
|
2023-07-15 17:15:38 +00:00
|
|
|
pytest-rerunfailures
|
2020-11-03 02:18:15 +00:00
|
|
|
pytest-timeout
|
2024-02-07 01:22:34 +00:00
|
|
|
pytest-xdist
|
2020-11-03 02:18:15 +00:00
|
|
|
pytestCheckHook
|
2023-04-12 12:48:02 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "--reruns=3" ];
|
2020-11-03 02:18:15 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
disabledTests = [
|
|
|
|
# failing since zigpy 0.60.0
|
|
|
|
"test_join_device"
|
|
|
|
"test_nonstandard_profile"
|
|
|
|
"test_permit_join"
|
|
|
|
"test_request_recovery_route_rediscovery_zdo"
|
|
|
|
"test_watchdog"
|
|
|
|
"test_zigpy_request"
|
|
|
|
"test_zigpy_request_failure"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "zigpy_znp" ];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-07-14 12:49:19 +00:00
|
|
|
description = "Library for zigpy which communicates with TI ZNP radios";
|
2021-05-20 23:08:51 +00:00
|
|
|
homepage = "https://github.com/zigpy/zigpy-znp";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/zigpy/zigpy-znp/releases/tag/v${version}";
|
2020-11-03 02:18:15 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ mvnetbiz ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|