Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / goodwe / default.nix
blob8e4eb71a97dc38820bff9371d8ce87f4d18e95c2
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   pytestCheckHook,
6   pythonOlder,
7   setuptools,
8 }:
10 buildPythonPackage rec {
11   pname = "goodwe";
12   version = "0.3.3";
13   pyproject = true;
15   disabled = pythonOlder "3.8";
17   src = fetchFromGitHub {
18     owner = "marcelblijleven";
19     repo = "goodwe";
20     rev = "refs/tags/v${version}";
21     hash = "sha256-CIEv3srjyVWQ1UGKVRwPXpzrND/8hTbw6HSlko9+AIk=";
22   };
24   postPatch = ''
25     substituteInPlace setup.cfg \
26       --replace-fail "'marcelblijleven@gmail.com" "marcelblijleven@gmail.com" \
27       --replace-fail "version: file: VERSION" "version = ${version}"
28   '';
30   build-system = [ setuptools ];
32   nativeCheckInputs = [ pytestCheckHook ];
34   pythonImportsCheck = [ "goodwe" ];
36   meta = with lib; {
37     description = "Python library for connecting to GoodWe inverter";
38     homepage = "https://github.com/marcelblijleven/goodwe";
39     changelog = "https://github.com/marcelblijleven/goodwe/releases/tag/v${version}";
40     license = licenses.mit;
41     maintainers = with maintainers; [ fab ];
42   };