nixpkgs-suyu/pkgs/development/python-modules/aiopvpc/default.nix

61 lines
1.1 KiB
Nix
Raw Normal View History

2021-04-22 22:22:54 +02:00
{ lib
, aiohttp
, async-timeout
, backports-zoneinfo
2021-04-22 22:22:54 +02:00
, buildPythonPackage
, fetchFromGitHub
, holidays
2021-04-22 22:22:54 +02:00
, poetry-core
, pytest-asyncio
, pytest-timeout
, pytestCheckHook
, pythonOlder
, tzdata
2021-04-22 22:22:54 +02:00
}:
buildPythonPackage rec {
pname = "aiopvpc";
version = "2.2.0";
disabled = pythonOlder "3.8";
2021-04-22 22:22:54 +02:00
format = "pyproject";
src = fetchFromGitHub {
owner = "azogue";
repo = pname;
rev = "v${version}";
sha256 = "1hk3giwzzlcqnpw9kx3zrr808nmdb7qwac60fki5395qffd2fpqw";
2021-04-22 22:22:54 +02:00
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
backports-zoneinfo
holidays
tzdata
2021-04-22 22:22:54 +02:00
async-timeout
];
checkInputs = [
pytest-asyncio
pytest-timeout
pytestCheckHook
];
postPatch = ''
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 ];
};
}