1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchFromGitHub,
6 freezegun,
7 ical,
8 mashumaro,
9 poetry-core,
10 pyjwt,
11 pytest-asyncio,
12 pytest-cov-stub,
13 pytestCheckHook,
14 pythonOlder,
15 syrupy,
16 tzlocal,
17}:
18
19buildPythonPackage rec {
20 pname = "aioautomower";
21 version = "2024.10.3";
22 pyproject = true;
23
24 disabled = pythonOlder "3.11";
25
26 src = fetchFromGitHub {
27 owner = "Thomas55555";
28 repo = "aioautomower";
29 rev = "refs/tags/${version}";
30 hash = "sha256-kLsHJBmNxh+PmJQ9Y9Ve/CACovzsRZyzVjor/VKUmYk=";
31 };
32
33 postPatch = ''
34 # Upstream doesn't set a version
35 substituteInPlace pyproject.toml \
36 --replace-fail 'version = "0.0.0"' 'version = "${version}"'
37 '';
38
39 build-system = [ poetry-core ];
40
41 dependencies = [
42 aiohttp
43 ical
44 mashumaro
45 pyjwt
46 tzlocal
47 ];
48
49 nativeCheckInputs = [
50 freezegun
51 pytest-asyncio
52 pytest-cov-stub
53 pytestCheckHook
54 syrupy
55 ];
56
57 pythonImportsCheck = [ "aioautomower" ];
58
59 pytestFlagsArray = [ "--snapshot-update" ];
60
61 disabledTests = [
62 # File is missing
63 "test_standard_mower"
64 # Call no found
65 "test_post_commands"
66 ];
67
68 meta = with lib; {
69 description = "Module to communicate with the Automower Connect API";
70 homepage = "https://github.com/Thomas55555/aioautomower";
71 changelog = "https://github.com/Thomas55555/aioautomower/releases/tag/${version}";
72 license = licenses.asl20;
73 maintainers = with maintainers; [ fab ];
74 };
75}