2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
awesomeversion,
|
|
|
|
buildPythonPackage,
|
|
|
|
envoy-utils,
|
|
|
|
fetchFromGitHub,
|
|
|
|
httpx,
|
|
|
|
lxml,
|
|
|
|
orjson,
|
|
|
|
poetry-core,
|
|
|
|
pyjwt,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
respx,
|
|
|
|
syrupy,
|
|
|
|
tenacity,
|
2023-10-09 19:29:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyenphase";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1.21.0";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.11";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pyenphase";
|
|
|
|
repo = "pyenphase";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-ZMua6mBedMdTBed/mDoK9h3HXbyf+3/Uo6CZJMxBlf0=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-04-21 15:54:59 +00:00
|
|
|
--replace-fail " --cov=pyenphase --cov-report=term-missing:skip-covered" ""
|
2023-10-09 19:29:22 +00:00
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [ poetry-core ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2023-10-09 19:29:22 +00:00
|
|
|
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"
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "pyenphase" ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library to control enphase envoy";
|
|
|
|
homepage = "https://github.com/pyenphase/pyenphase";
|
2024-01-13 08:15:51 +00:00
|
|
|
changelog = "https://github.com/pyenphase/pyenphase/blob/v${version}/CHANGELOG.md";
|
2023-10-09 19:29:22 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|