From 1f5ffefa4546148e209518006f771301f1e213d2 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 21 Nov 2021 18:10:04 +0100 Subject: [PATCH] python3Packages.goodwe: init at 0.2.7 --- .../python-modules/goodwe/default.nix | 42 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/python-modules/goodwe/default.nix diff --git a/pkgs/development/python-modules/goodwe/default.nix b/pkgs/development/python-modules/goodwe/default.nix new file mode 100644 index 000000000000..185562844fb4 --- /dev/null +++ b/pkgs/development/python-modules/goodwe/default.nix @@ -0,0 +1,42 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "goodwe"; + version = "0.2.7"; + format = "pyproject"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "marcelblijleven"; + repo = pname; + rev = "v${version}"; + sha256 = "6/JAp7zK60+om4l14sLn+pUki0Q/5XwCJSawOf1q2q0="; + }; + + checkInputs = [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace setup.cfg \ + --replace "'marcelblijleven@gmail.com" "marcelblijleven@gmail.com" \ + --replace "version: file: VERSION" "version = ${version}" + ''; + + pythonImportsCheck = [ + "goodwe" + ]; + + meta = with lib; { + description = "Python library for connecting to GoodWe inverter"; + homepage = "https://github.com/marcelblijleven/goodwe"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 87b06b9eb148..26679e74ba3f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3152,6 +3152,8 @@ in { goocalendar = callPackage ../development/python-modules/goocalendar { }; + goodwe = callPackage ../development/python-modules/goodwe { }; + google-api-core = callPackage ../development/python-modules/google-api-core { }; google-api-python-client = callPackage ../development/python-modules/google-api-python-client { };