{ lib, aiohttp, buildPythonPackage, fetchFromGitHub, pytest-asyncio, pytestCheckHook, pythonOlder, setuptools, time-machine, zigpy, }: buildPythonPackage rec { pname = "zha-quirks"; version = "0.0.146"; pyproject = true; disabled = pythonOlder "3.12"; src = fetchFromGitHub { owner = "zigpy"; repo = "zha-device-handlers"; tag = version; hash = "sha256-eXT0intSWAYQ/DlIEIZDbv805aQCLXYXpvhWjnd3EVA="; }; 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 time-machine ]; disabledTests = [ # AssertionError: expected call not found "test_moes" "test_tuya_mcu_set_time" ]; disabledTestPaths = [ # TypeError: unhashable type: 'dict' "tests/test_quirks_v2.py" ]; 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/${src.tag}"; license = licenses.asl20; maintainers = with maintainers; [ fab ]; platforms = platforms.linux; }; }