depot/third_party/nixpkgs/pkgs/development/python-modules/zha-quirks/default.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

62 lines
1.3 KiB
Nix

{
lib,
aiohttp,
buildPythonPackage,
fetchFromGitHub,
pytest-asyncio,
pytestCheckHook,
pythonOlder,
setuptools,
zigpy,
}:
buildPythonPackage rec {
pname = "zha-quirks";
version = "0.0.115";
pyproject = true;
disabled = pythonOlder "3.12";
src = fetchFromGitHub {
owner = "zigpy";
repo = "zha-device-handlers";
rev = "refs/tags/${version}";
hash = "sha256-qqPBCLYS6yLpK8PzC3atQ73yi15XE3ywIUBVO7JPYVE=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail ', "setuptools-git-versioning<2"' "" \
--replace-fail 'dynamic = ["version"]' 'version = "${version}"'
'';
build-system = [ setuptools ];
dependencies = [
aiohttp
zigpy
];
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
];
disabledTests = [
# RuntimeError: no running event loop
"test_mfg_cluster_events"
"test_co2_sensor"
"test_smart_air_sensor"
];
pythonImportsCheck = [ "zhaquirks" ];
meta = with lib; {
description = "ZHA Device Handlers are custom quirks implementations for Zigpy";
homepage = "https://github.com/dmulcahey/zha-device-handlers";
changelog = "https://github.com/zigpy/zha-device-handlers/releases/tag/${version}";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
platforms = platforms.linux;
};
}