2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
aresponses,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
mashumaro,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
syrupy,
|
|
|
|
yarl,
|
2021-12-24 04:21:11 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pvo";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "2.1.1";
|
2021-12-24 04:21:11 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabled = pythonOlder "3.11";
|
2021-12-24 04:21:11 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "frenck";
|
|
|
|
repo = "python-pvoutput";
|
2023-03-24 00:07:29 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-Js8oPEMxJyWK1E6GDm1xwm2BilnV3WBM6Hibf6oFOKE=";
|
2021-12-24 04:21:11 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Upstream doesn't set a version for the pyproject.toml
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "0.0.0" "${version}" \
|
|
|
|
--replace "--cov" ""
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2021-12-24 04:21:11 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
2024-01-02 11:29:13 +00:00
|
|
|
mashumaro
|
2021-12-24 04:21:11 +00:00
|
|
|
yarl
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-24 04:21:11 +00:00
|
|
|
aresponses
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
2024-01-02 11:29:13 +00:00
|
|
|
syrupy
|
2021-12-24 04:21:11 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "pvo" ];
|
2021-12-24 04:21:11 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module to interact with the PVOutput API";
|
|
|
|
homepage = "https://github.com/frenck/python-pvoutput";
|
2023-03-24 00:07:29 +00:00
|
|
|
changelog = "https://github.com/frenck/python-pvoutput/releases/tag/v${version}";
|
2021-12-24 04:21:11 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|