2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchFromGitHub,
|
|
|
|
aiocoap,
|
|
|
|
dtlssocket,
|
|
|
|
pydantic,
|
|
|
|
pytestCheckHook,
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytradfri";
|
2023-02-09 11:40:11 +00:00
|
|
|
version = "13.0.0";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "setuptools";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "home-assistant-libs";
|
|
|
|
repo = "pytradfri";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-02-09 11:40:11 +00:00
|
|
|
hash = "sha256-CWv3ebDulZuiFP+nJ2Xr7U/HTDFTqA9VYC0USLkpWR0=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ pydantic ];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
passthru.optional-dependencies = {
|
2022-04-15 01:41:22 +00:00
|
|
|
async = [
|
|
|
|
aiocoap
|
|
|
|
dtlssocket
|
|
|
|
];
|
|
|
|
};
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ] ++ passthru.optional-dependencies.async;
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "pytradfri" ];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python package to communicate with the IKEA Trådfri ZigBee Gateway";
|
|
|
|
homepage = "https://github.com/home-assistant-libs/pytradfri";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/home-assistant-libs/pytradfri/releases/tag/${version}";
|
2021-06-28 23:13:55 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2024-01-13 08:15:51 +00:00
|
|
|
# https://github.com/home-assistant-libs/pytradfri/issues/720
|
|
|
|
broken = versionAtLeast pydantic.version "2";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
}
|