depot/third_party/nixpkgs/pkgs/development/python-modules/aioelectricitymaps/default.nix

60 lines
1.1 KiB
Nix
Raw Normal View History

{
lib,
aiohttp,
aioresponses,
buildPythonPackage,
fetchFromGitHub,
mashumaro,
orjson,
poetry-core,
pytest-asyncio,
pytestCheckHook,
pythonOlder,
syrupy,
}:
buildPythonPackage rec {
pname = "aioelectricitymaps";
version = "1.0.0";
pyproject = true;
disabled = pythonOlder "3.11";
src = fetchFromGitHub {
owner = "jpbede";
repo = "aioelectricitymaps";
rev = "refs/tags/v${version}";
hash = "sha256-l6D5Cr2d89n+Ac5V5geBUY0sOiEO3sci9244K0MI+dc=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-warn "--cov" ""
'';
nativeBuildInputs = [ poetry-core ];
propagatedBuildInputs = [
aiohttp
mashumaro
orjson
];
nativeCheckInputs = [
aioresponses
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 ];
};
}