depot/third_party/nixpkgs/pkgs/development/python-modules/zha-quirks/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

58 lines
1.2 KiB
Nix

{ lib
, aiohttp
, buildPythonPackage
, fetchFromGitHub
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, setuptools
, zigpy
}:
buildPythonPackage rec {
pname = "zha-quirks";
version = "0.0.109";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "zigpy";
repo = "zha-device-handlers";
rev = "refs/tags/${version}";
hash = "sha256-fkE44j+wXdIJekJJNoO67YzsghalTUpyNx9R/B2Vn1Y=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace ', "setuptools-git-versioning<2"' "" \
--replace 'dynamic = ["version"]' 'version = "${version}"'
'';
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
aiohttp
zigpy
];
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
];
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;
};
}