2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
async-timeout,
|
|
|
|
backports-zoneinfo,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytest-timeout,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
python-dotenv,
|
2021-05-20 23:08:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiopvpc";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "4.3.1";
|
|
|
|
pyproject = true;
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "azogue";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "aiopvpc";
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-1xeXfhoXRfJ7vrpRPeYmwcAGjL09iNCOm/f4pPvuZLU=";
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
postPatch = ''
|
2024-04-21 15:54:59 +00:00
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail " --cov --cov-report term --cov-report html" ""
|
2023-02-02 18:25:31 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ poetry-core ];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2021-05-20 23:08:51 +00:00
|
|
|
aiohttp
|
|
|
|
async-timeout
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.9") [ backports-zoneinfo ];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-20 23:08:51 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-timeout
|
|
|
|
pytestCheckHook
|
2023-02-02 18:25:31 +00:00
|
|
|
python-dotenv
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "aiopvpc" ];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module to download Spanish electricity hourly prices (PVPC)";
|
|
|
|
homepage = "https://github.com/azogue/aiopvpc";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/azogue/aiopvpc/blob/v${version}/CHANGELOG.md";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|