Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / goodwe / default.nix
blob38b4af1e3adafe844f84744105412ff39887487c
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pytestCheckHook
5 , pythonOlder
6 , setuptools
7 }:
9 buildPythonPackage rec {
10   pname = "goodwe";
11   version = "0.2.32";
12   format = "pyproject";
14   disabled = pythonOlder "3.8";
16   src = fetchFromGitHub {
17     owner = "marcelblijleven";
18     repo = pname;
19     rev = "refs/tags/v${version}";
20     hash = "sha256-Uj4f3OcPRqbMaM0ADP6OlPQAXFfCYZS0/qbz9eXGLv0=";
21   };
23   postPatch = ''
24     substituteInPlace setup.cfg \
25       --replace "'marcelblijleven@gmail.com" "marcelblijleven@gmail.com" \
26       --replace "version: file: VERSION" "version = ${version}"
27   '';
29   nativeBuildInputs = [
30     setuptools
31   ];
33   pythonImportsCheck = [
34     "goodwe"
35   ];
37   nativeCheckInputs = [
38     pytestCheckHook
39   ];
42   meta = with lib; {
43     description = "Python library for connecting to GoodWe inverter";
44     homepage = "https://github.com/marcelblijleven/goodwe";
45     changelog = "https://github.com/marcelblijleven/goodwe/releases/tag/v${version}";
46     license = licenses.mit;
47     maintainers = with maintainers; [ fab ];
48   };