Files
nixpkgs/pkgs/development/python-modules/aiohttp-client-cache/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

89 lines
1.6 KiB
Nix

{
lib,
aioboto3,
aiobotocore,
aiofiles,
aiohttp,
aiosqlite,
attrs,
buildPythonPackage,
faker,
fetchPypi,
itsdangerous,
motor,
poetry-core,
pytest-asyncio,
pytest-aiohttp,
pytestCheckHook,
redis,
url-normalize,
}:
buildPythonPackage rec {
pname = "aiohttp-client-cache";
version = "0.14.1";
pyproject = true;
src = fetchPypi {
pname = "aiohttp_client_cache";
inherit version;
hash = "sha256-r1VW9xmBSsoC22OEJxBpzsame+Maa32UN+CmqZgKSU8=";
};
build-system = [ poetry-core ];
dependencies = [
aiohttp
attrs
itsdangerous
url-normalize
];
optional-dependencies = {
all = [
aioboto3
aiobotocore
aiofiles
aiosqlite
motor
redis
];
dynamodb = [
aioboto3
aiobotocore
];
filesystem = [
aiofiles
aiosqlite
];
mongodb = [ motor ];
redis = [ redis ];
sqlite = [ aiosqlite ];
};
nativeCheckInputs = [
faker
pytest-asyncio
pytest-aiohttp
pytestCheckHook
]
++ lib.concatAttrValues optional-dependencies;
pytestFlags = [ "--asyncio-mode=auto" ];
pythonImportsCheck = [ "aiohttp_client_cache" ];
disabledTestPaths = [
# Tests require running instances of the services
"test/integration/*"
];
meta = {
description = "Async persistent cache for aiohttp requests";
homepage = "https://github.com/requests-cache/aiohttp-client-cache";
changelog = "https://github.com/requests-cache/aiohttp-client-cache/blob/v${version}/HISTORY.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ seirl ];
};
}