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