1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytestCheckHook
5, pythonOlder
6, requests
7, responses
8}:
9
10buildPythonPackage rec {
11 pname = "tesla-powerwall";
12 version = "0.3.18";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchFromGitHub {
18 owner = "jrester";
19 repo = "tesla_powerwall";
20 rev = "v${version}";
21 hash = "sha256-Z+axzTiKDgJqGhl2c6g7N1AbmXO46lbaHVOXhMstoCY=";
22 };
23
24 propagatedBuildInputs = [
25 requests
26 ];
27
28 checkInputs = [
29 pytestCheckHook
30 responses
31 ];
32
33 pytestFlagsArray = [
34 "tests/unit"
35 ];
36
37 pythonImportsCheck = [
38 "tesla_powerwall"
39 ];
40
41 meta = with lib; {
42 description = "API for Tesla Powerwall";
43 homepage = "https://github.com/jrester/tesla_powerwall";
44 license = licenses.mit;
45 maintainers = with maintainers; [ dotlambda ];
46 };
47}