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