2021-04-22 21:22:54 +01:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, async-timeout
|
2021-06-01 11:01:10 +01:00
|
|
|
, backports-zoneinfo
|
2021-04-22 21:22:54 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-06-19 18:20:04 +01:00
|
|
|
, holidays
|
2021-04-22 21:22:54 +01:00
|
|
|
, poetry-core
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-timeout
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2021-06-01 11:01:10 +01:00
|
|
|
, tzdata
|
2021-04-22 21:22:54 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiopvpc";
|
2021-11-21 09:50:56 +00:00
|
|
|
version = "2.2.4";
|
2021-04-22 21:22:54 +01:00
|
|
|
format = "pyproject";
|
|
|
|
|
2021-11-05 08:46:08 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
2021-04-22 21:22:54 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "azogue";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-11-21 09:50:56 +00:00
|
|
|
sha256 = "sha256-39cGDbaBS5we+WbqvABe6tKwTmbgd+NYLssKQCOuBsc=";
|
2021-04-22 21:22:54 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
2021-06-01 11:01:10 +01:00
|
|
|
backports-zoneinfo
|
2021-06-19 18:20:04 +01:00
|
|
|
holidays
|
2021-06-01 11:01:10 +01:00
|
|
|
tzdata
|
2021-04-22 21:22:54 +01:00
|
|
|
async-timeout
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-timeout
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2021-06-01 11:01:10 +01:00
|
|
|
substituteInPlace pyproject.toml --replace \
|
2021-04-22 21:22:54 +01:00
|
|
|
" --cov --cov-report term --cov-report html" ""
|
|
|
|
'';
|
|
|
|
|
2021-11-05 08:46:08 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"aiopvpc"
|
|
|
|
];
|
2021-04-22 21:22:54 +01: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 ];
|
|
|
|
};
|
|
|
|
}
|