From 495818f35a7c0c58c88594988b5a7728e041470c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 15 Jun 2021 21:06:06 +0200 Subject: [PATCH 1/3] python3Packages.bimmer-connected: init at 0.7.15 --- .../bimmer-connected/default.nix | 43 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/development/python-modules/bimmer-connected/default.nix diff --git a/pkgs/development/python-modules/bimmer-connected/default.nix b/pkgs/development/python-modules/bimmer-connected/default.nix new file mode 100644 index 000000000000..c7abe9cfd990 --- /dev/null +++ b/pkgs/development/python-modules/bimmer-connected/default.nix @@ -0,0 +1,43 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, pbr +, requests +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "bimmer-connected"; + version = "0.7.15"; + + disabled = pythonOlder "3.5"; + + src = fetchFromGitHub { + owner = "bimmerconnected"; + repo = "bimmer_connected"; + rev = version; + sha256 = "193m16rrq7mfvzjcq823icdr9fp3i8grqqn3ci8zhcsq6w3vnb90"; + }; + + nativeBuildInputs = [ + pbr + ]; + + PBR_VERSION = version; + + propagatedBuildInputs = [ + requests + ]; + + checkInputs = [ + pytestCheckHook + ]; + + meta = with lib; { + description = "Library to read data from the BMW Connected Drive portal"; + homepage = "https://github.com/bimmerconnected/bimmer_connected"; + license = licenses.asl20; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 865c6aa8fcb3..73ec53bc393f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1055,6 +1055,8 @@ in { billiard = callPackage ../development/python-modules/billiard { }; + bimmer-connected = callPackage ../development/python-modules/bimmer-connected { }; + binaryornot = callPackage ../development/python-modules/binaryornot { }; binho-host-adapter = callPackage ../development/python-modules/binho-host-adapter { }; From a4fd978b0f703d36f15f2c7b67eb0aff525bb30e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 15 Jun 2021 21:06:34 +0200 Subject: [PATCH 2/3] home-assistant: update component-packages.nix --- 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 04d3b5baa4c1..af1aecb3dcc8 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -94,7 +94,7 @@ "bme280" = ps: with ps; [ smbus-cffi ]; # missing inputs: i2csense "bme680" = ps: with ps; [ bme680 smbus-cffi ]; "bmp280" = ps: with ps; [ ]; # missing inputs: RPi.GPIO adafruit-circuitpython-bmp280 - "bmw_connected_drive" = ps: with ps; [ ]; # missing inputs: bimmer_connected + "bmw_connected_drive" = ps: with ps; [ bimmer-connected ]; "bond" = ps: with ps; [ bond-api ]; "bosch_shc" = ps: with ps; [ aiohttp-cors boschshcpy ifaddr zeroconf ]; "braviatv" = ps: with ps; [ bravia-tv ]; From ad94d74c973be2b5c55305aaa39fd451071a1977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 15 Jun 2021 21:07:49 +0200 Subject: [PATCH 3/3] home-assistant: test bmw_connected_drive component --- pkgs/servers/home-assistant/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index eb2fa70bbb92..6c72440ae06d 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -310,6 +310,7 @@ in with py.pkgs; buildPythonApplication rec { "blebox" "blueprint" "bluetooth_le_tracker" + "bmw_connected_drive" "bond" "bosch_shc" "braviatv"