2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "goodwe";
|
2024-06-24 18:47:55 +00:00
|
|
|
version = "0.4.8";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "marcelblijleven";
|
2024-02-29 20:09:43 +00:00
|
|
|
repo = "goodwe";
|
2022-07-14 12:49:19 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-06-24 18:47:55 +00:00
|
|
|
hash = "sha256-EsMv4hzGsAV9OTFo2b/omM4hx7XxUcdO6rrMzQ3DmNQ=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
2024-02-29 20:09:43 +00:00
|
|
|
--replace-fail "'marcelblijleven@gmail.com" "marcelblijleven@gmail.com" \
|
|
|
|
--replace-fail "version: file: VERSION" "version = ${version}"
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [ setuptools ];
|
2022-09-30 11:47:45 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-09-30 11:47:45 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "goodwe" ];
|
2022-09-30 11:47:45 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library for connecting to GoodWe inverter";
|
|
|
|
homepage = "https://github.com/marcelblijleven/goodwe";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/marcelblijleven/goodwe/releases/tag/v${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|