2022-05-18 14:49:53 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-07-14 12:49:19 +00:00
|
|
|
, fetchFromGitHub
|
2022-05-18 14:49:53 +00:00
|
|
|
, pytestCheckHook
|
2022-07-14 12:49:19 +00:00
|
|
|
, pythonOlder
|
2024-02-29 20:09:43 +00:00
|
|
|
, aiohttp
|
|
|
|
, urllib3
|
|
|
|
, orjson
|
|
|
|
, aresponses
|
2024-01-13 08:15:51 +00:00
|
|
|
, setuptools
|
2022-05-18 14:49:53 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "tesla-powerwall";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.5.2";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2022-05-18 14:49:53 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jrester";
|
|
|
|
repo = "tesla_powerwall";
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-cAsJKFM0i0e7w2T4HP4a5ybJGuDvBAGCGmPEKFzNFAY=";
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
propagatedBuildInputs = [
|
2024-02-29 20:09:43 +00:00
|
|
|
aiohttp
|
|
|
|
urllib3
|
|
|
|
orjson
|
2022-05-18 14:49:53 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2024-02-29 20:09:43 +00:00
|
|
|
aresponses
|
2022-05-18 14:49:53 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"tests/unit"
|
|
|
|
];
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"tesla_powerwall"
|
|
|
|
];
|
2022-05-18 14:49:53 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
meta = with lib; {
|
2022-05-18 14:49:53 +00:00
|
|
|
description = "API for Tesla Powerwall";
|
|
|
|
homepage = "https://github.com/jrester/tesla_powerwall";
|
2023-01-20 10:41:00 +00:00
|
|
|
changelog = "https://github.com/jrester/tesla_powerwall/blob/v${version}/CHANGELOG";
|
2022-07-14 12:49:19 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
}
|