diff --git a/pkgs/development/python-modules/aranet4/default.nix b/pkgs/development/python-modules/aranet4/default.nix new file mode 100644 index 000000000000..09781342b288 --- /dev/null +++ b/pkgs/development/python-modules/aranet4/default.nix @@ -0,0 +1,43 @@ +{ lib +, bleak +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +, requests +}: + +buildPythonPackage rec { + pname = "aranet4"; + version = "2.1.3"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "Anrijs"; + repo = "Aranet4-Python"; + rev = "refs/tags/v${version}"; + hash = "sha256-5q4eOC9iuN8pUmDsiQ7OwEXkxi4KdL+bhGVjlQlTBAg="; + }; + + propagatedBuildInputs = [ + bleak + requests + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "aranet4" + ]; + + meta = with lib; { + description = "Module to interact with Aranet4 devices"; + homepage = "https://github.com/Anrijs/Aranet4-Python"; + 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 c273ed451330..f3019647bd40 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -181,6 +181,7 @@ ]; # missing inputs: sharp_aquos_rc "aranet" = ps: with ps; [ aiohttp-cors + aranet4 bleak-retry-connector bleak bluetooth-adapters @@ -194,7 +195,7 @@ pyserial pyudev sqlalchemy - ]; # missing inputs: aranet4 + ]; "arcam_fmj" = ps: with ps; [ arcam-fmj ]; @@ -4116,6 +4117,7 @@ "application_credentials" "apprise" "aprs" + "aranet" "arcam_fmj" "aseko_pool_live" "asuswrt" diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index eed851a1e2ae..ad44e267092d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -548,6 +548,8 @@ self: super: with self; { arabic-reshaper = callPackage ../development/python-modules/arabic-reshaper { }; + aranet4 = callPackage ../development/python-modules/aranet4 { }; + arc4 = callPackage ../development/python-modules/arc4 { }; arcam-fmj = callPackage ../development/python-modules/arcam-fmj { };