2021-11-21 17:10:04 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2022-09-16 16:42:21 +00:00
|
|
|
, setuptools
|
2021-11-21 17:10:04 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "goodwe";
|
2023-03-12 21:58:35 +00:00
|
|
|
version = "0.2.28";
|
2021-11-21 17:10:04 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "marcelblijleven";
|
|
|
|
repo = pname;
|
2022-07-06 19:56:14 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-13 07:25:10 +00:00
|
|
|
hash = "sha256-HkOlvZaCQOt+jbmzal17W5eU7SEq+kzTgbFd3fiTY/A=";
|
2021-11-21 17:10:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "'marcelblijleven@gmail.com" "marcelblijleven@gmail.com" \
|
|
|
|
--replace "version: file: VERSION" "version = ${version}"
|
|
|
|
'';
|
|
|
|
|
2022-09-16 16:42:21 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2021-11-21 17:10:04 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"goodwe"
|
|
|
|
];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2022-09-16 16:42:21 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
|
2021-11-21 17:10:04 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library for connecting to GoodWe inverter";
|
|
|
|
homepage = "https://github.com/marcelblijleven/goodwe";
|
2023-01-27 08:11:17 +00:00
|
|
|
changelog = "https://github.com/marcelblijleven/goodwe/releases/tag/v${version}";
|
2021-11-21 17:10:04 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|