nixpkgs/pkgs/development/python-modules/aioweenect/default.nix
2024-08-12 22:21:42 +02:00

54 lines
1.1 KiB
Nix

{
lib,
aiohttp,
aresponses,
buildPythonPackage,
fetchFromGitHub,
hatchling,
pytest-asyncio,
pytestCheckHook,
pythonOlder,
}:
buildPythonPackage rec {
pname = "aioweenect";
version = "1.1.5";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "eifinger";
repo = "aioweenect";
rev = "refs/tags/v${version}";
hash = "sha256-2qTjRXQdTExqY5/ckB6UrkmavzjZK/agfL9+o6fXS0M=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "--cov --cov-report term-missing --cov=src/aioweenect --asyncio-mode=auto" ""
'';
pythonRelaxDeps = [ "aiohttp" ];
build-system = [ hatchling ];
dependencies = [ aiohttp ];
nativeCheckInputs = [
aresponses
pytest-asyncio
pytestCheckHook
];
pythonImportsCheck = [ "aioweenect" ];
meta = with lib; {
description = "Library for the weenect API";
homepage = "https://github.com/eifinger/aioweenect";
changelog = "https://github.com/eifinger/aioweenect/releases/tag/v${version}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}