1{ lib 2, aiohttp-retry 3, buildPythonPackage 4, fetchFromGitHub 5, freezegun 6, ical 7, parameterized 8, pycryptodome 9, pydantic 10, pytest-aiohttp 11, pytest-asyncio 12, pytest-golden 13, pytest-mock 14, pytestCheckHook 15, python-dateutil 16, pythonOlder 17, pyyaml 18, requests 19, requests-mock 20, responses 21}: 22 23buildPythonPackage rec { 24 pname = "pyrainbird"; 25 version = "4.0.0"; 26 format = "setuptools"; 27 28 disabled = pythonOlder "3.10"; 29 30 src = fetchFromGitHub { 31 owner = "allenporter"; 32 repo = pname; 33 rev = "refs/tags/${version}"; 34 hash = "sha256-VwcYyD9JtLDU2Bgp2hlptDz3vPoX4revTRKTA8OkWEw="; 35 }; 36 37 postPatch = '' 38 substituteInPlace pytest.ini \ 39 --replace "--cov=pyrainbird --cov-report=term-missing" "" 40 41 substituteInPlace setup.cfg \ 42 --replace "pycryptodome>=3.16.0" "pycryptodome" 43 ''; 44 45 propagatedBuildInputs = [ 46 aiohttp-retry 47 ical 48 pycryptodome 49 pydantic 50 python-dateutil 51 pyyaml 52 requests 53 ]; 54 55 __darwinAllowLocalNetworking = true; 56 57 nativeCheckInputs = [ 58 freezegun 59 parameterized 60 pytest-aiohttp 61 pytest-asyncio 62 pytest-golden 63 pytest-mock 64 pytestCheckHook 65 requests-mock 66 responses 67 ]; 68 69 pythonImportsCheck = [ 70 "pyrainbird" 71 ]; 72 73 meta = with lib; { 74 description = "Module to interact with Rainbird controllers"; 75 homepage = "https://github.com/allenporter/pyrainbird"; 76 changelog = "https://github.com/allenporter/pyrainbird/releases/tag/${version}"; 77 license = with licenses; [ mit ]; 78 maintainers = with maintainers; [ fab ]; 79 }; 80}