2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
|
|
|
, acme
|
|
|
|
, aiohttp
|
|
|
|
, asynctest
|
|
|
|
, atomicwrites
|
|
|
|
, attrs
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pycognito
|
|
|
|
, pytest-aiohttp
|
|
|
|
, pytestCheckHook
|
|
|
|
, snitun
|
|
|
|
, warrant
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "hass-nabucasa";
|
2022-03-05 16:20:37 +00:00
|
|
|
version = "0.54.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nabucasa";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-03-05 16:20:37 +00:00
|
|
|
sha256 = "sha256-UL7HPmii65p+WO22y0qv8zq3yICKarRORqE+FK1u7OE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i 's/"acme.*"/"acme"/' setup.py
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "cryptography>=2.8,<4.0" "cryptography" \
|
2022-04-15 01:41:22 +00:00
|
|
|
--replace "snitun==" "snitun>=" \
|
|
|
|
--replace "pycognito==2022.01.0" "pycognito"
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-02-05 17:12:51 +00:00
|
|
|
acme
|
|
|
|
aiohttp
|
|
|
|
atomicwrites
|
|
|
|
attrs
|
|
|
|
pycognito
|
|
|
|
snitun
|
|
|
|
warrant
|
2020-06-15 15:56:04 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
doCheck = lib.versionAtLeast pytest-aiohttp.version "1.0.0";
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
checkInputs = [
|
|
|
|
asynctest
|
|
|
|
pytest-aiohttp
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
pythonImportsCheck = [ "hass_nabucasa" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/NabuCasa/hass-nabucasa";
|
2021-06-28 23:13:55 +00:00
|
|
|
description = "Python module for the Home Assistant cloud integration";
|
2021-03-15 08:37:03 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ Scriptkiddi ];
|
|
|
|
};
|
|
|
|
}
|