2023-11-16 04:20:00 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, aresponses
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2024-02-07 01:22:34 +00:00
|
|
|
, mashumaro
|
|
|
|
, orjson
|
2023-11-16 04:20:00 +00:00
|
|
|
, poetry-core
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, syrupy
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aioelectricitymaps";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "0.4.0";
|
2023-11-16 04:20:00 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
disabled = pythonOlder "3.11";
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jpbede";
|
|
|
|
repo = "aioelectricitymaps";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-q06B40c0uvSuzH/3YCoxg4p9aNIOPrphsoESktF+B14=";
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-warn "--cov" ""
|
|
|
|
'';
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
2024-02-07 01:22:34 +00:00
|
|
|
mashumaro
|
|
|
|
orjson
|
2023-11-16 04:20:00 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
aresponses
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
syrupy
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"aioelectricitymaps"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Module for interacting with Electricity maps";
|
|
|
|
homepage = "https://github.com/jpbede/aioelectricitymaps";
|
|
|
|
changelog = "https://github.com/jpbede/aioelectricitymaps/releases/tag/v${version}";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|