From acdddc982db283ebd3390031a281a3e851f0adc1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 10 Jan 2021 23:25:37 +0100 Subject: [PATCH 1/2] python3Packages.teslajsonpy: init at 0.10.4 --- .../python-modules/teslajsonpy/default.nix | 39 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 41 insertions(+) create mode 100644 pkgs/development/python-modules/teslajsonpy/default.nix diff --git a/pkgs/development/python-modules/teslajsonpy/default.nix b/pkgs/development/python-modules/teslajsonpy/default.nix new file mode 100644 index 000000000000..c4520b1c1982 --- /dev/null +++ b/pkgs/development/python-modules/teslajsonpy/default.nix @@ -0,0 +1,39 @@ +{ lib +, aiohttp +, backoff +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, wrapt +}: + +buildPythonPackage rec { + pname = "teslajsonpy"; + version = "0.10.4"; + + src = fetchFromGitHub { + owner = "zabuldon"; + repo = pname; + rev = "v${version}"; + sha256 = "18frynmy47i9c24mdy819y2dnjwmhnmkly5mbmhikpbmm6d0yjf1"; + }; + + propagatedBuildInputs = [ + aiohttp + backoff + wrapt + ]; + + checkInputs = [ pytestCheckHook ]; + + # Not all Home Assistant related check pass + disabledTests = [ "test_values_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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8b5f6ec0d607..af5d981f167a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7420,6 +7420,8 @@ in { termstyle = callPackage ../development/python-modules/termstyle { }; + teslajsonpy = callPackage ../development/python-modules/teslajsonpy { }; + tess = callPackage ../development/python-modules/tess { }; tesserocr = callPackage ../development/python-modules/tesserocr { }; From c7bd6f6d85980f60084a5604ba8c5fe526e2c5ea Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 10 Jan 2021 23:27:25 +0100 Subject: [PATCH 2/2] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index c961ffe538c6..e233c9dec009 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -828,7 +828,7 @@ "temper" = ps: with ps; [ ]; # missing inputs: temperusb "template" = ps: with ps; [ ]; "tensorflow" = ps: with ps; [ numpy pillow tensorflow-build_2 ]; # missing inputs: pycocotools tf-models-official - "tesla" = ps: with ps; [ ]; # missing inputs: teslajsonpy + "tesla" = ps: with ps; [ teslajsonpy ]; "tfiac" = ps: with ps; [ ]; # missing inputs: pytfiac "thermoworks_smoke" = ps: with ps; [ stringcase ]; # missing inputs: thermoworks_smoke "thethingsnetwork" = ps: with ps; [ ];