From 21b61381da7363d56055e1b0909b70716792d04d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 10 Aug 2022 20:23:12 +0200 Subject: [PATCH 1/8] python310Packages.sensor-state-data: init at 2.0.2 --- .../sensor-state-data/default.nix | 48 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 50 insertions(+) create mode 100644 pkgs/development/python-modules/sensor-state-data/default.nix diff --git a/pkgs/development/python-modules/sensor-state-data/default.nix b/pkgs/development/python-modules/sensor-state-data/default.nix new file mode 100644 index 000000000000..a29ad29a92c3 --- /dev/null +++ b/pkgs/development/python-modules/sensor-state-data/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, home-assistant-bluetooth +, poetry-core +, pytestCheckHook +, pythonOlder +, sensor-state-data +}: + +buildPythonPackage rec { + pname = "sensor-state-data"; + version = "2.0.2"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "Bluetooth-Devices"; + repo = pname; + rev = "v${version}"; + hash = "sha256-EywNH6REtopJoowsKQNNyJNYYyBR7L2pcrvmZAr5PZg="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + checkInputs = [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace " --cov=sensor_state_data --cov-report=term-missing:skip-covered" "" + ''; + + pythonImportsCheck = [ + "sensor_state_data" + ]; + + meta = with lib; { + description = "Models for storing and converting Sensor Data state"; + homepage = "https://github.com/bluetooth-devices/sensor-state-data"; + 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 6f90e3ca8388..0a70b5f81c45 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9721,6 +9721,8 @@ in { sense-energy = callPackage ../development/python-modules/sense-energy { }; + sensor-state-data = callPackage ../development/python-modules/sensor-state-data { }; + sentencepiece = callPackage ../development/python-modules/sentencepiece { inherit (pkgs) sentencepiece; }; From e9b94c278ef082b69318b4f62848c8d00372e071 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 10 Aug 2022 20:28:06 +0200 Subject: [PATCH 2/8] python310Packages.bluetooth-sensor-state-data: init at 1.5.0 --- .../bluetooth-sensor-state-data/default.nix | 53 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 55 insertions(+) create mode 100644 pkgs/development/python-modules/bluetooth-sensor-state-data/default.nix diff --git a/pkgs/development/python-modules/bluetooth-sensor-state-data/default.nix b/pkgs/development/python-modules/bluetooth-sensor-state-data/default.nix new file mode 100644 index 000000000000..72edd0e6ca38 --- /dev/null +++ b/pkgs/development/python-modules/bluetooth-sensor-state-data/default.nix @@ -0,0 +1,53 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, home-assistant-bluetooth +, poetry-core +, pytestCheckHook +, pythonOlder +, sensor-state-data +}: + +buildPythonPackage rec { + pname = "bluetooth-sensor-state-data"; + version = "1.5.0"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "Bluetooth-Devices"; + repo = pname; + rev = "v${version}"; + hash = "sha256-Xr9MCTcEnO5bMk9AdBTwBCXwm33UUTP7FYZyjDYrMNA="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + home-assistant-bluetooth + sensor-state-data + ]; + + checkInputs = [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace " --cov=bluetooth_sensor_state_data --cov-report=term-missing:skip-covered" "" + ''; + + pythonImportsCheck = [ + "bluetooth_sensor_state_data" + ]; + + meta = with lib; { + description = "Models for storing and converting Bluetooth Sensor State Data"; + homepage = "https://github.com/bluetooth-devices/bluetooth-sensor-state-data"; + 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 0a70b5f81c45..9cf38d9ecb23 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1351,6 +1351,8 @@ in { bluetooth-adapters = callPackage ../development/python-modules/bluetooth-adapters { }; + bluetooth-sensor-state-data = callPackage ../development/python-modules/bluetooth-sensor-state-data { }; + blurhash = callPackage ../development/python-modules/blurhash { }; bme280spi = callPackage ../development/python-modules/bme280spi { }; From e63f6199268d5e2922c2f014f52d22bfcd36cb99 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 10 Aug 2022 20:31:41 +0200 Subject: [PATCH 3/8] python310Packages.moat-ble: init at 0.1.1 --- .../python-modules/moat-ble/default.nix | 55 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 57 insertions(+) create mode 100644 pkgs/development/python-modules/moat-ble/default.nix diff --git a/pkgs/development/python-modules/moat-ble/default.nix b/pkgs/development/python-modules/moat-ble/default.nix new file mode 100644 index 000000000000..33a59c72f8a0 --- /dev/null +++ b/pkgs/development/python-modules/moat-ble/default.nix @@ -0,0 +1,55 @@ +{ lib +, bluetooth-sensor-state-data +, buildPythonPackage +, fetchFromGitHub +, home-assistant-bluetooth +, poetry-core +, pytestCheckHook +, pythonOlder +, sensor-state-data +}: + +buildPythonPackage rec { + pname = "moat-ble"; + version = "0.1.1"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "Bluetooth-Devices"; + repo = pname; + rev = "v${version}"; + hash = "sha256-dy1Fm0Z1PUsPY8QTiXUcWSi+csFnTUsobSkA92m06QI="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + bluetooth-sensor-state-data + home-assistant-bluetooth + sensor-state-data + ]; + + checkInputs = [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace " --cov=moat_ble --cov-report=term-missing:skip-covered" "" + ''; + + pythonImportsCheck = [ + "moat_ble" + ]; + + meta = with lib; { + description = "Library for Moat BLE devices"; + homepage = "https://github.com/Bluetooth-Devices/moat-ble"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9cf38d9ecb23..814cb54a4c0e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5573,6 +5573,8 @@ in { mnist = callPackage ../development/python-modules/mnist { }; + moat-ble = callPackage ../development/python-modules/moat-ble { }; + mocket = callPackage ../development/python-modules/mocket { }; mock = callPackage ../development/python-modules/mock { }; From 7fd4378140f8971d32c22b83cf71d15285ca0b56 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 10 Aug 2022 20:37:32 +0200 Subject: [PATCH 4/8] python310Packages.sensorpush-ble: init at 1.5.1 --- .../python-modules/sensorpush-ble/default.nix | 55 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 57 insertions(+) create mode 100644 pkgs/development/python-modules/sensorpush-ble/default.nix diff --git a/pkgs/development/python-modules/sensorpush-ble/default.nix b/pkgs/development/python-modules/sensorpush-ble/default.nix new file mode 100644 index 000000000000..80fcbfa17694 --- /dev/null +++ b/pkgs/development/python-modules/sensorpush-ble/default.nix @@ -0,0 +1,55 @@ +{ lib +, bluetooth-sensor-state-data +, buildPythonPackage +, fetchFromGitHub +, home-assistant-bluetooth +, poetry-core +, pytestCheckHook +, pythonOlder +, sensor-state-data +}: + +buildPythonPackage rec { + pname = "sensorpush-ble"; + version = "1.5.1"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "Bluetooth-Devices"; + repo = pname; + rev = "v${version}"; + hash = "sha256-2Q56fXMgw1Al3l6WKI1cdGXfLmZ1qkidkoWKmvEXRaI="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + bluetooth-sensor-state-data + home-assistant-bluetooth + sensor-state-data + ]; + + checkInputs = [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace " --cov=sensorpush_ble --cov-report=term-missing:skip-covered" "" + ''; + + pythonImportsCheck = [ + "sensorpush_ble" + ]; + + meta = with lib; { + description = "Library for SensorPush BLE devices"; + homepage = "https://github.com/Bluetooth-Devices/sensorpush-ble"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 814cb54a4c0e..387eb6d058e5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9727,6 +9727,8 @@ in { sensor-state-data = callPackage ../development/python-modules/sensor-state-data { }; + sensorpush-ble = callPackage ../development/python-modules/sensorpush-ble { }; + sentencepiece = callPackage ../development/python-modules/sentencepiece { inherit (pkgs) sentencepiece; }; From 02992588dee6c52439db7cd234af5abcf0021ae9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 10 Aug 2022 20:46:51 +0200 Subject: [PATCH 5/8] python310Packages.xiaomi-ble: init at 0.8.0 --- .../python-modules/xiaomi-ble/default.nix | 59 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 61 insertions(+) create mode 100644 pkgs/development/python-modules/xiaomi-ble/default.nix diff --git a/pkgs/development/python-modules/xiaomi-ble/default.nix b/pkgs/development/python-modules/xiaomi-ble/default.nix new file mode 100644 index 000000000000..7d13d6d3a6d2 --- /dev/null +++ b/pkgs/development/python-modules/xiaomi-ble/default.nix @@ -0,0 +1,59 @@ +{ lib +, bleak-retry-connector +, bluetooth-sensor-state-data +, buildPythonPackage +, fetchFromGitHub +, home-assistant-bluetooth +, poetry-core +, pycryptodomex +, pytestCheckHook +, pythonOlder +, sensor-state-data +}: + +buildPythonPackage rec { + pname = "xiaomi-ble"; + version = "0.8.0"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "Bluetooth-Devices"; + repo = pname; + rev = "v${version}"; + hash = "sha256-HwA2NKsrqXBsC5/rUZUNfHDk8QA7I+zQmwqt0SVhw38="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + bleak-retry-connector + bluetooth-sensor-state-data + home-assistant-bluetooth + pycryptodomex + sensor-state-data + ]; + + checkInputs = [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace " --cov=xiaomi_ble --cov-report=term-missing:skip-covered" "" + ''; + + pythonImportsCheck = [ + "xiaomi_ble" + ]; + + meta = with lib; { + description = "Library for Xiaomi BLE devices"; + homepage = "https://github.com/Bluetooth-Devices/xiaomi-ble"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 387eb6d058e5..5862ba0c39f9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11555,6 +11555,8 @@ in { xhtml2pdf = callPackage ../development/python-modules/xhtml2pdf { }; + xiaomi-ble = callPackage ../development/python-modules/xiaomi-ble { }; + xkbcommon = callPackage ../development/python-modules/xkbcommon { }; xkcdpass = callPackage ../development/python-modules/xkcdpass { }; From 55a87a6d227723c0d908a05f7e67aee6b0f4c450 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 10 Aug 2022 20:51:59 +0200 Subject: [PATCH 6/8] python310Packages.inkbird-ble: init at 0.5.2 --- .../python-modules/inkbird-ble/default.nix | 55 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 57 insertions(+) create mode 100644 pkgs/development/python-modules/inkbird-ble/default.nix diff --git a/pkgs/development/python-modules/inkbird-ble/default.nix b/pkgs/development/python-modules/inkbird-ble/default.nix new file mode 100644 index 000000000000..896905306dd6 --- /dev/null +++ b/pkgs/development/python-modules/inkbird-ble/default.nix @@ -0,0 +1,55 @@ +{ lib +, bluetooth-sensor-state-data +, buildPythonPackage +, fetchFromGitHub +, home-assistant-bluetooth +, poetry-core +, pytestCheckHook +, pythonOlder +, sensor-state-data +}: + +buildPythonPackage rec { + pname = "inkbird-ble"; + version = "0.5.2"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "Bluetooth-Devices"; + repo = pname; + rev = "v${version}"; + hash = "sha256-ieVjgNCkU6AJDTgLzmn2YPCNm+kId65QW3SNu2Xou1Q="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + bluetooth-sensor-state-data + home-assistant-bluetooth + sensor-state-data + ]; + + checkInputs = [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace " --cov=inkbird_ble --cov-report=term-missing:skip-covered" "" + ''; + + pythonImportsCheck = [ + "inkbird_ble" + ]; + + meta = with lib; { + description = "Library for Inkbird BLE devices"; + homepage = "https://github.com/Bluetooth-Devices/inkbird-ble"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5862ba0c39f9..20bd3a1802cb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4352,6 +4352,8 @@ in { injector = callPackage ../development/python-modules/injector { }; + inkbird-ble = callPackage ../development/python-modules/inkbird-ble { }; + inkex = callPackage ../development/python-modules/inkex { }; inotify = callPackage ../development/python-modules/inotify { }; From cadd4a18cd8fee290c4ba49b963ca0b5466bd1da Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 10 Aug 2022 20:57:38 +0200 Subject: [PATCH 7/8] python310Packages.govee-ble: init at 0.14.0 --- .../python-modules/govee-ble/default.nix | 55 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 57 insertions(+) create mode 100644 pkgs/development/python-modules/govee-ble/default.nix diff --git a/pkgs/development/python-modules/govee-ble/default.nix b/pkgs/development/python-modules/govee-ble/default.nix new file mode 100644 index 000000000000..1a3a31d7d717 --- /dev/null +++ b/pkgs/development/python-modules/govee-ble/default.nix @@ -0,0 +1,55 @@ +{ lib +, bluetooth-sensor-state-data +, buildPythonPackage +, fetchFromGitHub +, home-assistant-bluetooth +, poetry-core +, pytestCheckHook +, pythonOlder +, sensor-state-data +}: + +buildPythonPackage rec { + pname = "govee-ble"; + version = "0.14.0"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "Bluetooth-Devices"; + repo = pname; + rev = "v${version}"; + hash = "sha256-iJ3fvbQBIk2fpCfz9/uvxk6WcGaL8OVDsNQux+pTBhM="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + bluetooth-sensor-state-data + home-assistant-bluetooth + sensor-state-data + ]; + + checkInputs = [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace " --cov=govee_ble --cov-report=term-missing:skip-covered" "" + ''; + + pythonImportsCheck = [ + "govee_ble" + ]; + + meta = with lib; { + description = "Library for Govee BLE devices"; + homepage = "https://github.com/Bluetooth-Devices/govee-ble"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 20bd3a1802cb..4ab0b1b6194d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3776,6 +3776,8 @@ in { gorilla = callPackage ../development/python-modules/gorilla { }; + govee-ble = callPackage ../development/python-modules/govee-ble { }; + goveelights = callPackage ../development/python-modules/goveelights { }; gpapi = callPackage ../development/python-modules/gpapi { }; From 95fc07c200fe8585bf94a6eb095d39dcb12734e4 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 10 Aug 2022 21:02:13 +0200 Subject: [PATCH 8/8] home-assistant: update component-packages --- .../home-assistant/component-packages.nix | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 5cdc68e44a45..e8d156728d47 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -1038,7 +1038,8 @@ aiohttp-cors bleak bluetooth-adapters - ]; # missing inputs: govee-ble + govee-ble + ]; "gpsd" = ps: with ps; [ gps3 ]; @@ -1278,7 +1279,8 @@ aiohttp-cors bleak bluetooth-adapters - ]; # missing inputs: inkbird-ble + inkbird-ble + ]; "input_boolean" = ps: with ps; [ ]; "input_button" = ps: with ps; [ @@ -1660,7 +1662,8 @@ aiohttp-cors bleak bluetooth-adapters - ]; # missing inputs: moat-ble + moat-ble + ]; "mobile_app" = ps: with ps; [ pynacl pyturbojpeg @@ -2394,7 +2397,8 @@ aiohttp-cors bleak bluetooth-adapters - ]; # missing inputs: sensorpush-ble + sensorpush-ble + ]; "sentry" = ps: with ps; [ sentry-sdk ]; @@ -3140,7 +3144,8 @@ aiohttp-cors bleak bluetooth-adapters - ]; # missing inputs: xiaomi-ble + xiaomi-ble + ]; "xiaomi_miio" = ps: with ps; [ construct micloud @@ -3464,6 +3469,7 @@ "google_translate" "google_travel_time" "google_wifi" + "govee_ble" "gpslogger" "graphite" "gree" @@ -3514,6 +3520,7 @@ "image_processing" "imap_email_content" "influxdb" + "inkbird" "input_boolean" "input_button" "input_datetime" @@ -3591,6 +3598,7 @@ "minecraft_server" "minio" "mjpeg" + "moat" "mobile_app" "modbus" "modem_callerid" @@ -3729,6 +3737,7 @@ "senseme" "sensibo" "sensor" + "sensorpush" "sentry" "senz" "seventeentrack" @@ -3891,6 +3900,7 @@ "xbox" "xiaomi" "xiaomi_aqara" + "xiaomi_ble" "xiaomi_miio" "yale_smart_alarm" "yamaha"