1{
2 lib,
3 aiohttp,
4 aresponses,
5 buildPythonPackage,
6 fetchFromGitHub,
7 fetchpatch,
8 poetry-core,
9 pytest-aiohttp,
10 pytest-asyncio,
11 pytestCheckHook,
12 pythonOlder,
13}:
14
15buildPythonPackage rec {
16 pname = "aioflo";
17 version = "2021.11.0";
18 pyproject = true;
19
20 disabled = pythonOlder "3.9";
21
22 src = fetchFromGitHub {
23 owner = "bachya";
24 repo = "aioflo";
25 tag = version;
26 hash = "sha256-7NrOoc1gi8YzZaKvCnHnzAKPlMnMhqxjdyZGN5H/8TQ=";
27 };
28
29 patches = [
30 (fetchpatch {
31 # Clean-up, https://github.com/bachya/aioflo/pull/65
32 name = "clean-up-build-dependencies.patch";
33 url = "https://github.com/bachya/aioflo/commit/f38d3f6427777ab0eeb56177943679e2570f0634.patch";
34 hash = "sha256-iLgklhEZ61rrdzQoO6rp1HGZcqLsqGNitwIiPNLNHQ4=";
35 })
36 ];
37
38 build-system = [ poetry-core ];
39
40 dependencies = [ aiohttp ];
41
42 __darwinAllowLocalNetworking = true;
43
44 nativeCheckInputs = [
45 aresponses
46 pytest-aiohttp
47 pytest-asyncio
48 pytestCheckHook
49 ];
50
51 pythonImportsCheck = [ "aioflo" ];
52
53 disabledTests = [
54 # test is out-dated
55 "test_system_modes"
56 ];
57
58 meta = with lib; {
59 description = "Python library for Flo by Moen Smart Water Detectors";
60 homepage = "https://github.com/bachya/aioflo";
61 changelog = "https://github.com/bachya/aioflo/releases/tag/${version}";
62 license = licenses.mit;
63 maintainers = with maintainers; [ fab ];
64 };
65}