1{ 2 lib, 3 acme, 4 aiohttp, 5 atomicwrites-homeassistant, 6 attrs, 7 buildPythonPackage, 8 ciso8601, 9 cryptography, 10 fetchFromGitHub, 11 freezegun, 12 pycognito, 13 pyjwt, 14 pytest-aiohttp, 15 pytest-socket, 16 pytest-timeout, 17 pytestCheckHook, 18 pythonOlder, 19 sentence-stream, 20 setuptools, 21 snitun, 22 syrupy, 23 webrtc-models, 24 xmltodict, 25}: 26 27buildPythonPackage rec { 28 pname = "hass-nabucasa"; 29 version = "1.1.1"; 30 pyproject = true; 31 32 disabled = pythonOlder "3.13"; 33 34 src = fetchFromGitHub { 35 owner = "nabucasa"; 36 repo = "hass-nabucasa"; 37 tag = version; 38 hash = "sha256-4wqlV3stqbraiDBp/g5XNMiUR8SsmGggqXlq6MXXgbM="; 39 }; 40 41 postPatch = '' 42 substituteInPlace pyproject.toml \ 43 --replace-fail "0.0.0" "${version}" 44 ''; 45 46 build-system = [ setuptools ]; 47 48 pythonRelaxDeps = [ 49 "acme" 50 "josepy" 51 "snitun" 52 ]; 53 54 dependencies = [ 55 acme 56 aiohttp 57 atomicwrites-homeassistant 58 attrs 59 ciso8601 60 cryptography 61 pycognito 62 pyjwt 63 sentence-stream 64 snitun 65 webrtc-models 66 ]; 67 68 nativeCheckInputs = [ 69 freezegun 70 pytest-aiohttp 71 pytest-socket 72 pytest-timeout 73 pytestCheckHook 74 syrupy 75 xmltodict 76 ]; 77 78 disabledTests = [ 79 # mock time 10800s (3h) vs 43200s (12h) 80 "test_subscription_reconnection_handler_renews_and_starts" 81 ]; 82 83 pythonImportsCheck = [ "hass_nabucasa" ]; 84 85 meta = with lib; { 86 description = "Python module for the Home Assistant cloud integration"; 87 homepage = "https://github.com/NabuCasa/hass-nabucasa"; 88 changelog = "https://github.com/NabuCasa/hass-nabucasa/releases/tag/${src.tag}"; 89 license = licenses.gpl3Only; 90 maintainers = with maintainers; [ Scriptkiddi ]; 91 }; 92}