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/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/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/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/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/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/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/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" diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6f90e3ca8388..4ab0b1b6194d 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 { }; @@ -3774,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 { }; @@ -4350,6 +4354,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 { }; @@ -5571,6 +5577,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 { }; @@ -9721,6 +9729,10 @@ in { sense-energy = callPackage ../development/python-modules/sense-energy { }; + 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; }; @@ -11547,6 +11559,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 { };