2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
# build inputs
|
|
|
|
starlette,
|
|
|
|
brotli,
|
|
|
|
# check inputs
|
|
|
|
httpx,
|
|
|
|
requests,
|
|
|
|
mypy,
|
|
|
|
brotlipy,
|
2023-07-15 17:15:38 +00:00
|
|
|
}:
|
|
|
|
let
|
|
|
|
pname = "brotli-asgi";
|
|
|
|
version = "1.4.0";
|
|
|
|
in
|
|
|
|
buildPythonPackage {
|
|
|
|
inherit pname version;
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fullonic";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-hQ6CSXnAoUSaKUSmE+2GHZemkFqd8Dc5+OvcUD7/r5Y=";
|
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
starlette
|
|
|
|
brotli
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "brotli_asgi" ];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
2024-02-29 20:09:43 +00:00
|
|
|
httpx
|
2023-07-15 17:15:38 +00:00
|
|
|
requests
|
|
|
|
mypy
|
|
|
|
brotlipy
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A compression AGSI middleware using brotli";
|
|
|
|
homepage = "https://github.com/fullonic/brotli-asgi";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ happysalada ];
|
|
|
|
};
|
|
|
|
}
|