depot/third_party/nixpkgs/pkgs/development/python-modules/tesla-powerwall/default.nix
Default email c7cb07f092 Project import generated by Copybara.
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
2024-02-29 21:09:43 +01:00

57 lines
1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, aiohttp
, urllib3
, orjson
, aresponses
, setuptools
}:
buildPythonPackage rec {
pname = "tesla-powerwall";
version = "0.5.1";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "jrester";
repo = "tesla_powerwall";
rev = "refs/tags/v${version}";
hash = "sha256-if/FCfxAB48WGXZOMvCtdSOW2FWO43OrlcHZbXIPmGE=";
};
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
aiohttp
urllib3
orjson
];
nativeCheckInputs = [
aresponses
pytestCheckHook
];
pytestFlagsArray = [
"tests/unit"
];
pythonImportsCheck = [
"tesla_powerwall"
];
meta = with lib; {
description = "API for Tesla Powerwall";
homepage = "https://github.com/jrester/tesla_powerwall";
changelog = "https://github.com/jrester/tesla_powerwall/blob/v${version}/CHANGELOG";
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
};
}