2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, awesomeversion
|
|
|
|
, buildPythonPackage
|
|
|
|
, envoy-utils
|
|
|
|
, fetchFromGitHub
|
|
|
|
, httpx
|
|
|
|
, lxml
|
|
|
|
, orjson
|
|
|
|
, poetry-core
|
|
|
|
, pyjwt
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, respx
|
|
|
|
, syrupy
|
|
|
|
, tenacity
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyenphase";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "1.12.0";
|
2023-10-09 19:29:22 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.11";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pyenphase";
|
|
|
|
repo = "pyenphase";
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-gqbRz0JAp8hjZpFUzlFzqq86UKgD0TLWSp1Z9rdrk3s=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace " --cov=pyenphase --cov-report=term-missing:skip-covered" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
awesomeversion
|
|
|
|
envoy-utils
|
|
|
|
httpx
|
|
|
|
lxml
|
|
|
|
orjson
|
|
|
|
pyjwt
|
|
|
|
tenacity
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
respx
|
|
|
|
syrupy
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# https://github.com/pyenphase/pyenphase/issues/97
|
|
|
|
"test_with_7_x_firmware"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"pyenphase"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library to control enphase envoy";
|
|
|
|
homepage = "https://github.com/pyenphase/pyenphase";
|
|
|
|
changelog = "https://github.com/pyenphase/pyenphase/blob/${version}/CHANGELOG.md";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|