depot/third_party/nixpkgs/pkgs/development/python-modules/pytradfri/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

54 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, aiocoap
, dtlssocket
, pydantic
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pytradfri";
version = "13.0.0";
format = "setuptools";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "home-assistant-libs";
repo = "pytradfri";
rev = "refs/tags/${version}";
hash = "sha256-CWv3ebDulZuiFP+nJ2Xr7U/HTDFTqA9VYC0USLkpWR0=";
};
propagatedBuildInputs = [
pydantic
];
passthru.optional-dependencies = {
async = [
aiocoap
dtlssocket
];
};
nativeCheckInputs = [
pytestCheckHook
]
++ passthru.optional-dependencies.async;
pythonImportsCheck = [
"pytradfri"
];
meta = with lib; {
description = "Python package to communicate with the IKEA Trådfri ZigBee Gateway";
homepage = "https://github.com/home-assistant-libs/pytradfri";
changelog = "https://github.com/home-assistant-libs/pytradfri/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
# https://github.com/home-assistant-libs/pytradfri/issues/720
broken = versionAtLeast pydantic.version "2";
};
}