2020-12-25 13:55:36 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, acme, aiohttp, snitun, attrs, pycognito, warrant
|
2020-12-25 13:55:36 +00:00
|
|
|
, pytest-aiohttp, asynctest, atomicwrites, pytest }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "hass-nabucasa";
|
2020-12-25 13:55:36 +00:00
|
|
|
version = "0.39.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nabucasa";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-12-25 13:55:36 +00:00
|
|
|
sha256 = "1bsvwxddpp4dsq3k2320qrx5x9lscqzffzz1zj6fbwgc4741f01w";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2020-06-15 15:56:04 +00:00
|
|
|
sed -i 's/"acme.*"/"acme"/' setup.py
|
2020-12-25 13:55:36 +00:00
|
|
|
sed -i 's/"attrs.*"/"attrs"/' setup.py
|
2020-08-20 17:08:02 +00:00
|
|
|
sed -i 's/"cryptography.*"/"cryptography"/' setup.py
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
acme aiohttp atomicwrites snitun attrs warrant pycognito
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkInputs = [ pytest pytest-aiohttp asynctest ];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|