2024-01-22 10:07:44 +01:00
|
|
|
{ lib
|
|
|
|
, anysqlite
|
2024-02-14 23:06:37 +01:00
|
|
|
, boto3
|
2024-01-22 10:07:44 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, hatch-fancy-pypi-readme
|
|
|
|
, hatchling
|
|
|
|
, httpx
|
2024-02-14 23:06:37 +01:00
|
|
|
, moto
|
2024-01-22 10:07:44 +01:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, pyyaml
|
|
|
|
, redis
|
|
|
|
, trio
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "hishel";
|
2024-02-14 23:06:37 +01:00
|
|
|
version = "0.0.24";
|
2024-01-22 10:07:44 +01:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "karpetrosyan";
|
|
|
|
repo = "hishel";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-02-14 23:06:37 +01:00
|
|
|
hash = "sha256-wup1rQ5MHjsBaTdfueP9y7QhutoO0xYeexZPDQpUEJk=";
|
2024-01-22 10:07:44 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
hatch-fancy-pypi-readme
|
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
httpx
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
redis = [
|
|
|
|
redis
|
|
|
|
];
|
2024-02-14 23:06:37 +01:00
|
|
|
s3 = [
|
|
|
|
boto3
|
|
|
|
];
|
2024-01-22 10:07:44 +01:00
|
|
|
sqlite = [
|
|
|
|
anysqlite
|
|
|
|
];
|
|
|
|
yaml = [
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
2024-02-14 23:06:37 +01:00
|
|
|
moto
|
2024-01-22 10:07:44 +01:00
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
trio
|
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"hishel"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests require a running Redis instance
|
|
|
|
"test_redis"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "HTTP Cache implementation for HTTPX and HTTP Core";
|
|
|
|
homepage = "https://github.com/karpetrosyan/hishel";
|
|
|
|
changelog = "https://github.com/karpetrosyan/hishel/blob/${version}/CHANGELOG.md";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|