2019-12-29 18:37:08 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch, acme, aiohttp, snitun, attrs, pytest-aiohttp, warrant, pytest }:
|
2019-12-21 10:27:45 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "hass-nabucasa";
|
2020-02-26 15:51:51 +00:00
|
|
|
version = "0.31";
|
2019-12-21 10:27:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nabucasa";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-02-26 15:51:51 +00:00
|
|
|
sha256 = "0hxdvdj41gq5ryafjhrcgf6y8l33lyf45a1vgwwbk0q29sir9bnr";
|
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
|
|
|
|
'';
|
|
|
|
|
2019-12-21 10:27:45 +00:00
|
|
|
propagatedBuildInputs = [ acme aiohttp snitun attrs warrant ];
|
|
|
|
|
|
|
|
checkInputs = [ pytest pytest-aiohttp ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
pytest tests/
|
|
|
|
'';
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|