summary refs log tree commit diff
path: root/pkgs/development/python-modules/teslajsonpy/default.nix
blob: 08ef9975b228643eb2a1115254135b27ee2d154f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{ lib
, aiohttp
, backoff
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, wrapt
}:

buildPythonPackage rec {
  pname = "teslajsonpy";
  version = "0.11.0";

  src = fetchFromGitHub {
    owner = "zabuldon";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-yfaUa12doOvdFkbHHdOYcFcu86hYZtt2i0tya2ENjf4=";
  };

  propagatedBuildInputs = [
    aiohttp
    backoff
    wrapt
  ];

  checkInputs = [ pytestCheckHook ];

  # Not all Home Assistant related check pass
  # https://github.com/zabuldon/teslajsonpy/issues/121
  # https://github.com/zabuldon/teslajsonpy/pull/124
  disabledTests = [
    "test_values_on_init"
    "test_get_value_on_init"
  ];
  pythonImportsCheck = [ "teslajsonpy" ];

  meta = with lib; {
    description = "Python library to work with Tesla API";
    homepage = "https://github.com/zabuldon/teslajsonpy";
    license = with licenses; [ asl20 ];
    maintainers = with maintainers; [ fab ];
  };
}