2022-02-20 05:27:41 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, aresponses
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2024-02-29 20:09:43 +00:00
|
|
|
, mashumaro
|
|
|
|
, orjson
|
2022-02-20 05:27:41 +00:00
|
|
|
, poetry-core
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2024-02-29 20:09:43 +00:00
|
|
|
, pythonRelaxDepsHook
|
|
|
|
, syrupy
|
2022-02-20 05:27:41 +00:00
|
|
|
, yarl
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "autarco";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "0.3.0";
|
|
|
|
pyproject = true;
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "klaasnicolaas";
|
|
|
|
repo = "python-autarco";
|
2024-02-29 20:09:43 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-IBf6Dw2Yf7m+5bQ72K0kPxGdtpl8JowQ9IO3gWS3Vso=";
|
2022-02-20 05:27:41 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"orjson"
|
2023-10-09 19:29:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Upstream doesn't set a version for the pyproject.toml
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "0.0.0" "${version}" \
|
|
|
|
--replace "--cov" ""
|
|
|
|
'';
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
2024-02-29 20:09:43 +00:00
|
|
|
pythonRelaxDepsHook
|
2022-02-20 05:27:41 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
2024-02-29 20:09:43 +00:00
|
|
|
mashumaro
|
|
|
|
orjson
|
2022-02-20 05:27:41 +00:00
|
|
|
yarl
|
|
|
|
];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-02-20 05:27:41 +00:00
|
|
|
aresponses
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
2024-02-29 20:09:43 +00:00
|
|
|
syrupy
|
2022-02-20 05:27:41 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"autarco"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Module for the Autarco Inverter";
|
|
|
|
homepage = "https://github.com/klaasnicolaas/python-autarco";
|
2024-02-29 20:09:43 +00:00
|
|
|
changelog = "https://github.com/klaasnicolaas/python-autarco/releases/tag/v${version}";
|
2022-02-20 05:27:41 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|