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
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
hatchling,
isPyPy,
brotli,
brotlicffi,
starlette,
pythonOlder,
zstandard,
pytestCheckHook,
httpx,
trio,
}:
buildPythonPackage rec {
pname = "starlette-compress";
version = "1.6.1";
pyproject = true;
src = fetchFromGitHub {
owner = "Zaczero";
repo = "starlette-compress";
tag = version;
hash = "sha256-JRg0WeMVTYnSh2an+/duSXzAigbjbCZ9NUsSNpXlFg8=";
};
build-system = [ hatchling ];
dependencies = [
(if isPyPy then brotlicffi else brotli)
starlette
]
++ lib.optionals (pythonOlder "3.14") [
zstandard
];
checkInputs = [
httpx
trio
];
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "starlette_compress" ];
meta = {
description = "Compression middleware for Starlette - supporting ZStd, Brotli, and GZip";
homepage = "https://pypi.org/p/starlette-compress";
license = lib.licenses.bsd0;
maintainers = with lib.maintainers; [
wrvsrx
Zaczero
];
};
}
|