2021-04-22 22:22:54 +02:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, async-timeout
|
2021-06-01 12:01:10 +02:00
|
|
|
, backports-zoneinfo
|
2021-04-22 22:22:54 +02:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-timeout
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2021-06-01 12:01:10 +02:00
|
|
|
, tzdata
|
2021-04-22 22:22:54 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiopvpc";
|
2021-06-01 12:01:10 +02:00
|
|
|
version = "2.1.2";
|
|
|
|
disabled = pythonOlder "3.8";
|
2021-04-22 22:22:54 +02:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "azogue";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-06-01 12:01:10 +02:00
|
|
|
sha256 = "0s8ki46dh39kw6qvsjcfcxa0gblyi33m3hry137kbi4lw5ws6qhr";
|
2021-04-22 22:22:54 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
2021-06-01 12:01:10 +02:00
|
|
|
backports-zoneinfo
|
|
|
|
tzdata
|
2021-04-22 22:22:54 +02:00
|
|
|
async-timeout
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-timeout
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2021-06-01 12:01:10 +02:00
|
|
|
substituteInPlace pyproject.toml --replace \
|
2021-04-22 22:22:54 +02:00
|
|
|
" --cov --cov-report term --cov-report html" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "aiopvpc" ];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|