diff --git a/pkgs/development/python-modules/python-homewizard-energy/default.nix b/pkgs/development/python-modules/python-homewizard-energy/default.nix new file mode 100644 index 000000000000..9a13960090af --- /dev/null +++ b/pkgs/development/python-modules/python-homewizard-energy/default.nix @@ -0,0 +1,51 @@ +{ lib +, aiohttp +, aresponses +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, protobuf +, pytest-asyncio +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "python-homewizard-energy"; + version = "1.0.3"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "DCSBL"; + repo = pname; + rev = "v${version}"; + hash = "sha256-ioISqRFZZCojTJ/KYS8QUtoEpBNOPqY9lC9NFbZyh5A="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + ]; + + checkInputs = [ + aresponses + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ + "homewizard_energy" + ]; + + meta = with lib; { + description = "Library to communicate with HomeWizard Energy devices"; + homepage = "https://github.com/DCSBL/python-homewizard-energy"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 189207368ba3..e08543931c65 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8439,6 +8439,8 @@ in { python-hglib = callPackage ../development/python-modules/python-hglib { }; + python-homewizard-energy = callPackage ../development/python-modules/python-homewizard-energy { }; + python-hosts = callPackage ../development/python-modules/python-hosts { }; python-hpilo = callPackage ../development/python-modules/python-hpilo { };