2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
gpiozero,
|
|
|
|
mock,
|
|
|
|
pyserial,
|
|
|
|
pyserial-asyncio,
|
|
|
|
pyusb,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
zigpy,
|
2022-07-14 12:49:19 +00:00
|
|
|
}:
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "zigpy-zigate";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.12.0";
|
|
|
|
pyproject = true;
|
2022-07-14 12:49:19 +00:00
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-07-18 16:06:22 +00:00
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zigpy";
|
|
|
|
repo = "zigpy-zigate";
|
2023-04-29 16:46:19 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-wziXUFYSUXhzWHM870jphG12h99WVzqiYimtIbkXyM0=";
|
2020-07-18 16:06:22 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace ', "setuptools-git-versioning<2"' "" \
|
|
|
|
--replace 'dynamic = ["version"]' 'version = "${version}"'
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
gpiozero
|
2020-11-03 02:18:15 +00:00
|
|
|
pyserial
|
|
|
|
pyserial-asyncio
|
2020-11-21 19:51:51 +00:00
|
|
|
pyusb
|
2020-11-03 02:18:15 +00:00
|
|
|
zigpy
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-07-14 12:49:19 +00:00
|
|
|
mock
|
2020-11-03 02:18:15 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "zigpy_zigate" ];
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Fails in sandbox
|
|
|
|
"tests/test_application.py "
|
|
|
|
];
|
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
meta = with lib; {
|
2022-07-14 12:49:19 +00:00
|
|
|
description = "Library which communicates with ZiGate radios for zigpy";
|
2020-11-03 02:18:15 +00:00
|
|
|
homepage = "https://github.com/zigpy/zigpy-zigate";
|
2023-04-29 16:46:19 +00:00
|
|
|
changelog = "https://github.com/zigpy/zigpy-zigate/releases/tag/${version}";
|
2020-07-18 16:06:22 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2022-07-18 16:21:45 +00:00
|
|
|
maintainers = with maintainers; [ mvnetbiz ];
|
2020-07-18 16:06:22 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|