1{
2 lib,
3 aiohttp,
4 aioresponses,
5 awesomeversion,
6 buildPythonPackage,
7 fetchFromGitHub,
8 hatchling,
9 mashumaro,
10 orjson,
11 pytest-asyncio,
12 pytest-cov-stub,
13 pytestCheckHook,
14 pythonOlder,
15 syrupy,
16 webrtc-models,
17}:
18
19buildPythonPackage rec {
20 pname = "go2rtc-client";
21 version = "0.2.1";
22 pyproject = true;
23
24 disabled = pythonOlder "3.12";
25
26 src = fetchFromGitHub {
27 owner = "home-assistant-libs";
28 repo = "python-go2rtc-client";
29 tag = version;
30 hash = "sha256-d5N9IEmxCDKqDv4lD9tYyTPWtR6d86iCZzucx3Pbx7Y=";
31 };
32
33 postPatch = ''
34 substituteInPlace pyproject.toml \
35 --replace-fail 'version = "0.0.0"' 'version = "${version}"'
36 '';
37
38 pythonRelaxDeps = [ "orjson" ];
39
40 build-system = [ hatchling ];
41
42 dependencies = [
43 aiohttp
44 awesomeversion
45 mashumaro
46 orjson
47 webrtc-models
48 ];
49
50 nativeCheckInputs = [
51 aioresponses
52 pytest-asyncio
53 pytest-cov-stub
54 pytestCheckHook
55 syrupy
56 ];
57
58 pythonImportsCheck = [ "go2rtc_client" ];
59
60 meta = {
61 description = "Module for interacting with go2rtc";
62 homepage = "https://github.com/home-assistant-libs/python-go2rtc-client";
63 changelog = "https://github.com/home-assistant-libs/python-go2rtc-client/releases/tag/${version}";
64 license = lib.licenses.asl20;
65 maintainers = with lib.maintainers; [ ];
66 };
67}