1{
2 aiohttp,
3 aioresponses,
4 buildPythonPackage,
5 fetchFromGitHub,
6 lib,
7 pytest-asyncio,
8 pytestCheckHook,
9 pythonOlder,
10 setuptools,
11 yarl,
12}:
13
14buildPythonPackage rec {
15 pname = "ha-silabs-firmware-client";
16 version = "0.2.0";
17 pyproject = true;
18
19 disabled = pythonOlder "3.13";
20
21 src = fetchFromGitHub {
22 owner = "home-assistant-libs";
23 repo = "ha-silabs-firmware-client";
24 tag = "v${version}";
25 hash = "sha256-Kip9JL9tuF7OI22elN0w2Z7Xjdaayboo8LThp4FAets=";
26 };
27
28 postPatch = ''
29 substituteInPlace pyproject.toml \
30 --replace-fail ', "setuptools-git-versioning<3"' "" \
31 --replace-fail 'dynamic = ["version"]' 'version = "${version}"'
32 '';
33
34 build-system = [ setuptools ];
35
36 dependencies = [
37 aiohttp
38 yarl
39 ];
40
41 pythonImportsCheck = [ "ha_silabs_firmware_client" ];
42
43 nativeCheckInputs = [
44 aioresponses
45 pytest-asyncio
46 pytestCheckHook
47 ];
48
49 meta = {
50 changelog = "https://github.com/home-assistant-libs/ha-silabs-firmware-client/releases/tag/${src.tag}";
51 description = "Home Assistant client for firmwares released with silabs-firmware-builder";
52 homepage = "https://github.com/home-assistant-libs/ha-silabs-firmware-client";
53 license = lib.licenses.asl20;
54 maintainers = with lib.maintainers; [ dotlambda ];
55 };
56}