1{ lib
2, acme
3, aiohttp
4, atomicwrites-homeassistant
5, attrs
6, buildPythonPackage
7, fetchFromGitHub
8, pycognito
9, pytest-aiohttp
10, pytest-timeout
11, pytestCheckHook
12, pythonOlder
13, snitun
14, syrupy
15, xmltodict
16}:
17
18buildPythonPackage rec {
19 pname = "hass-nabucasa";
20 version = "0.66.2";
21 format = "setuptools";
22
23 disabled = pythonOlder "3.8";
24
25 src = fetchFromGitHub {
26 owner = "nabucasa";
27 repo = pname;
28 rev = "refs/tags/${version}";
29 hash = "sha256-LlVT5WRd2uhUaghThJ5ghPbX40QjqTenUC4txMx3Jlo=";
30 };
31
32 postPatch = ''
33 substituteInPlace setup.py \
34 --replace "acme==" "acme>=" \
35 --replace "pycognito==" "pycognito>=" \
36 --replace "snitun==" "snitun>=" \
37 '';
38
39 propagatedBuildInputs = [
40 acme
41 aiohttp
42 atomicwrites-homeassistant
43 attrs
44 pycognito
45 snitun
46 ];
47
48 nativeCheckInputs = [
49 pytest-aiohttp
50 pytest-timeout
51 pytestCheckHook
52 syrupy
53 xmltodict
54 ];
55
56 pythonImportsCheck = [
57 "hass_nabucasa"
58 ];
59
60 meta = with lib; {
61 homepage = "https://github.com/NabuCasa/hass-nabucasa";
62 description = "Python module for the Home Assistant cloud integration";
63 changelog = "https://github.com/NabuCasa/hass-nabucasa/releases/tag/${version}";
64 license = licenses.gpl3Only;
65 maintainers = with maintainers; [ Scriptkiddi ];
66 };
67}