python310Packages.brotli-asgi: init at 1.4.0

This commit is contained in:
happysalada 2023-07-12 09:43:48 +08:00 committed by Yt
parent 2f034246ba
commit 239ae48dd3
2 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,49 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
# build inputs
, starlette
, brotli
# check inputs
, 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 = [
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 ];
};
}

View File

@ -1535,6 +1535,8 @@ self: super: with self; {
brotli = callPackage ../development/python-modules/brotli { };
brotli-asgi = callPackage ../development/python-modules/brotli-asgi { };
brotlicffi = callPackage ../development/python-modules/brotlicffi {
inherit (pkgs) brotli;
};