02cf88bb76
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
58 lines
1 KiB
Nix
58 lines
1 KiB
Nix
{ lib
|
|
, aiohttp
|
|
, aioresponses
|
|
, aresponses
|
|
, backoff
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, poetry-core
|
|
, pytest-asyncio
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "tesla-wall-connector";
|
|
version = "1.0.1";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "einarhauks";
|
|
repo = pname;
|
|
rev = version;
|
|
hash = "sha256-JBtlGd9aHY8ikhpJ5v7ZcNu3BfLdBmOBZCMa6C0s6gE=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
poetry-core
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
aiohttp
|
|
backoff
|
|
];
|
|
|
|
checkInputs = [
|
|
aresponses
|
|
pytest-asyncio
|
|
pytestCheckHook
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace 'backoff = "^1.11.1"' 'backoff = "*"'
|
|
'';
|
|
|
|
pythonImportsCheck = [
|
|
"tesla_wall_connector"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Library for communicating with a Tesla Wall Connector";
|
|
homepage = "https://github.com/einarhauks/tesla-wall-connector";
|
|
license = with licenses; [ mit ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|