diff options
-rw-r--r-- | pkgs/development/python-modules/bluecurrent-api/default.nix | 54 | ||||
-rw-r--r-- | pkgs/servers/home-assistant/component-packages.nix | 4 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
3 files changed, 59 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/bluecurrent-api/default.nix b/pkgs/development/python-modules/bluecurrent-api/default.nix new file mode 100644 index 0000000000000..ca19887a0fb0e --- /dev/null +++ b/pkgs/development/python-modules/bluecurrent-api/default.nix @@ -0,0 +1,54 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchPypi +, pythonRelaxDepsHook +, setuptools +, pytz +, websockets +, pytest-asyncio +, pytest-mock +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "bluecurrent-api"; + version = "1.0.6"; + pyproject = true; + + disabled = pythonOlder "3.9"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-XHVdtkiG0ff/OY8g+W5iur7OAyhhk1UGA+XUfB2L8/o="; + }; + + nativeBuildInputs = [ + pythonRelaxDepsHook + setuptools + ]; + + pythonRemoveDeps = [ + "asyncio" + ]; + + propagatedBuildInputs = [ + pytz + websockets + ]; + + pythonImportsCheck = [ "bluecurrent_api" ]; + + nativeCheckInputs = [ + pytest-asyncio + pytest-mock + pytestCheckHook + ]; + + meta = { + description = "Wrapper for the Blue Current websocket api"; + homepage = "https://github.com/bluecurrent/HomeAssistantAPI"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index f5b8ab19c4467..743a70f2f1ee8 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -420,7 +420,8 @@ "bloomsky" = ps: with ps; [ ]; "blue_current" = ps: with ps; [ - ]; # missing inputs: bluecurrent-api + bluecurrent-api + ]; "bluemaestro" = ps: with ps; [ aioesphomeapi aiohttp-cors @@ -5786,6 +5787,7 @@ "blackbird" "blebox" "blink" + "blue_current" "bluemaestro" "blueprint" "bluetooth" diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index de8c6853d8b0a..f16bf7acf9ddf 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1575,6 +1575,8 @@ self: super: with self; { blosc2 = callPackage ../development/python-modules/blosc2 { }; + bluecurrent-api = callPackage ../development/python-modules/bluecurrent-api { }; + bluemaestro-ble = callPackage ../development/python-modules/bluemaestro-ble { }; bluepy = callPackage ../development/python-modules/bluepy { }; |