depot/third_party/nixpkgs/pkgs/development/python-modules/brotli-asgi/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

52 lines
895 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
# build inputs
starlette,
brotli,
# check inputs
httpx,
requests,
mypy,
brotlipy,
}:
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 = [
httpx
requests
mypy
brotlipy
];
meta = with lib; {
description = "Compression AGSI middleware using brotli";
homepage = "https://github.com/fullonic/brotli-asgi";
license = licenses.mit;
maintainers = with maintainers; [ happysalada ];
};
}