anki-bin: 24.06.3 -> 24.11 (#360722)
[NixPkgs.git] / pkgs / development / python-modules / goodwe / default.nix
blob2bc0b940952a4169c31714dedc59c3ddb91ef00c
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   pytestCheckHook,
6   pythonOlder,
7   setuptools,
8 }:
10 buildPythonPackage rec {
11   pname = "goodwe";
12   version = "0.4.8";
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-EsMv4hzGsAV9OTFo2b/omM4hx7XxUcdO6rrMzQ3DmNQ=";
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   };