2020-03-18 17:03:58 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch
|
|
|
|
, acme, aiohttp, snitun, attrs, pycognito, warrant
|
|
|
|
, pytest-aiohttp, asynctest, pytest }:
|
2019-12-21 10:27:45 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "hass-nabucasa";
|
2020-03-18 17:03:58 +00:00
|
|
|
version = "0.32.2";
|
2019-12-21 10:27:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nabucasa";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-03-18 17:03:58 +00:00
|
|
|
sha256 = "1hfi5q222kgbgrj5yvr4lbhca49hcs6sc2yhxc4pjxqsc12bv1f1";
|
2019-12-21 10:27:45 +00:00
|
|
|
};
|
|
|
|
|
2019-12-29 18:37:08 +00:00
|
|
|
# upstreamed in https://github.com/NabuCasa/hass-nabucasa/pull/119
|
|
|
|
postPatch = ''
|
|
|
|
sed -i 's/"acme.*/"acme>=0.40.0,<2.0"/' setup.py
|
|
|
|
cat setup.py
|
|
|
|
'';
|
|
|
|
|
2020-03-18 17:03:58 +00:00
|
|
|
propagatedBuildInputs = [ acme aiohttp snitun attrs warrant pycognito ];
|
2019-12-21 10:27:45 +00:00
|
|
|
|
2020-03-18 17:03:58 +00:00
|
|
|
checkInputs = [ pytest pytest-aiohttp asynctest ];
|
2019-12-21 10:27:45 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
pytest tests/
|
2020-03-18 17:03:58 +00:00
|
|
|
'';
|
2019-12-21 10:27:45 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/NabuCasa/hass-nabucasa";
|
|
|
|
description = "Home Assistant cloud integration by Nabu Casa, inc.";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ Scriptkiddi ];
|
|
|
|
};
|
|
|
|
}
|