blob: c07b55d765c1208a2b182451637977e842f9543e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
{ lib
, anysqlite
, buildPythonPackage
, fetchFromGitHub
, hatch-fancy-pypi-readme
, hatchling
, httpx
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, pyyaml
, redis
, trio
}:
buildPythonPackage rec {
pname = "hishel";
version = "0.0.21";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "karpetrosyan";
repo = "hishel";
rev = "refs/tags/${version}";
hash = "sha256-okNNYEq97qb2OoP3N+MvG7o3YADfd6LxP8EaNuWDGOM=";
};
nativeBuildInputs = [
hatch-fancy-pypi-readme
hatchling
];
propagatedBuildInputs = [
httpx
];
passthru.optional-dependencies = {
redis = [
redis
];
sqlite = [
anysqlite
];
yaml = [
pyyaml
];
};
nativeCheckInputs = [
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 ];
};
}
|