diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2023-07-05 08:43:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-05 08:43:36 +0200 |
commit | f339d26d3781ef1346304495ebdcfbbd77347231 (patch) | |
tree | 51f5cac12c4f69dee590e79234a3bb143f0c1a37 | |
parent | 93395eed37171957b6f7b7f27835b909ac2f1c1f (diff) | |
parent | 384d225b9be73ad617cef9a5df23708355e5b67a (diff) |
Merge pull request #241502 from fabaff/opower
python311Packages.opower: init at 0.0.12
-rw-r--r-- | pkgs/development/python-modules/opower/default.nix | 55 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
2 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/opower/default.nix b/pkgs/development/python-modules/opower/default.nix new file mode 100644 index 0000000000000..65bb9adae26d6 --- /dev/null +++ b/pkgs/development/python-modules/opower/default.nix @@ -0,0 +1,55 @@ +{ lib +, aiohttp +, arrow +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +, pythonRelaxDepsHook +, setuptools +}: + +buildPythonPackage rec { + pname = "opower"; + version = "0.0.12"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "tronikos"; + repo = "opower"; + rev = "refs/tags/v${version}"; + hash = "sha256-XrzcWKW1dRoVdRdo4ghmI13jVpWIOwZgzOl1nSUES30="; + }; + + pythonRemoveDeps = [ + # https://github.com/tronikos/opower/pull/4 + "asyncio" + ]; + + nativeBuildInputs = [ + pythonRelaxDepsHook + setuptools + ]; + + propagatedBuildInputs = [ + aiohttp + arrow + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "opower" + ]; + + meta = with lib; { + description = "Module for getting historical and forecasted usage/cost from utilities that use opower.com"; + homepage = "https://github.com/tronikos/opower"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bffe627bda142..6c25c8ef7034f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7296,6 +7296,8 @@ self: super: with self; { openwrt-ubus-rpc = callPackage ../development/python-modules/openwrt-ubus-rpc { }; + opower = callPackage ../development/python-modules/opower { }; + opsdroid_get_image_size = callPackage ../development/python-modules/opsdroid_get_image_size { }; opt-einsum = callPackage ../development/python-modules/opt-einsum { }; |