2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, async-timeout
|
2021-06-04 09:07:49 +00:00
|
|
|
, backports-zoneinfo
|
2021-05-20 23:08:51 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-06-28 23:13:55 +00:00
|
|
|
, holidays
|
2021-05-20 23:08:51 +00:00
|
|
|
, poetry-core
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-timeout
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2021-06-04 09:07:49 +00:00
|
|
|
, tzdata
|
2021-05-20 23:08:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiopvpc";
|
2021-12-30 13:39:12 +00:00
|
|
|
version = "3.0.0";
|
2021-05-20 23:08:51 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "azogue";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-12-30 13:39:12 +00:00
|
|
|
sha256 = "sha256-eTCQddoZIaCs7iKGNBC8aSq6ek4vwYXgIXx35UlME/k=";
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
2021-06-28 23:13:55 +00:00
|
|
|
holidays
|
2021-06-04 09:07:49 +00:00
|
|
|
tzdata
|
2021-05-20 23:08:51 +00:00
|
|
|
async-timeout
|
2022-01-13 20:06:32 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.9") [
|
|
|
|
backports-zoneinfo
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-timeout
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2021-06-04 09:07:49 +00:00
|
|
|
substituteInPlace pyproject.toml --replace \
|
2021-05-20 23:08:51 +00:00
|
|
|
" --cov --cov-report term --cov-report html" ""
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +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";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|