nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, acme
3, aiohttp
4, asynctest
5, atomicwrites
6, attrs
7, buildPythonPackage
8, fetchFromGitHub
9, pycognito
10, pytest-aiohttp
11, pytestCheckHook
12, snitun
13, warrant
14}:
15
16buildPythonPackage rec {
17 pname = "hass-nabucasa";
18 version = "0.54.0";
19
20 src = fetchFromGitHub {
21 owner = "nabucasa";
22 repo = pname;
23 rev = version;
24 sha256 = "sha256-UL7HPmii65p+WO22y0qv8zq3yICKarRORqE+FK1u7OE=";
25 };
26
27 postPatch = ''
28 sed -i 's/"acme.*"/"acme"/' setup.py
29 substituteInPlace setup.py \
30 --replace "cryptography>=2.8,<4.0" "cryptography" \
31 --replace "snitun==" "snitun>=" \
32 --replace "pycognito==2022.01.0" "pycognito"
33 '';
34
35 propagatedBuildInputs = [
36 acme
37 aiohttp
38 atomicwrites
39 attrs
40 pycognito
41 snitun
42 warrant
43 ];
44
45 doCheck = lib.versionAtLeast pytest-aiohttp.version "1.0.0";
46
47 checkInputs = [
48 asynctest
49 pytest-aiohttp
50 pytestCheckHook
51 ];
52
53 pythonImportsCheck = [ "hass_nabucasa" ];
54
55 meta = with lib; {
56 homepage = "https://github.com/NabuCasa/hass-nabucasa";
57 description = "Python module for the Home Assistant cloud integration";
58 license = licenses.gpl3Only;
59 maintainers = with maintainers; [ Scriptkiddi ];
60 };
61}