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