depot/third_party/nixpkgs/pkgs/development/python-modules/brotli-asgi/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

49 lines
863 B
Nix

{ 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 ];
};
}