e7ec2969af
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
53 lines
989 B
Nix
53 lines
989 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, requests
|
|
, responses
|
|
, setuptools
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "tesla-powerwall";
|
|
version = "0.4.0";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jrester";
|
|
repo = "tesla_powerwall";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-IqUxWwEvrSEbLAEnHG84oCV75qO0L5LmgpHOfaM6G8o=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
setuptools
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
requests
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
responses
|
|
];
|
|
|
|
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 ];
|
|
};
|
|
}
|