2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "goodwe";
|
2022-04-15 01:41:22 +00:00
|
|
|
version = "0.2.17";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "marcelblijleven";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-04-15 01:41:22 +00:00
|
|
|
sha256 = "sha256-Lx7jvL7Fyq8fqJQq8ZgEG/V20+tHxw3yl3s7scAwwjA=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "'marcelblijleven@gmail.com" "marcelblijleven@gmail.com" \
|
|
|
|
--replace "version: file: VERSION" "version = ${version}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"goodwe"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library for connecting to GoodWe inverter";
|
|
|
|
homepage = "https://github.com/marcelblijleven/goodwe";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|