567e8dfd8e
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
53 lines
901 B
Nix
53 lines
901 B
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pythonOlder,
|
|
# build inputs
|
|
starlette,
|
|
brotli,
|
|
# check inputs
|
|
httpx,
|
|
requests,
|
|
mypy,
|
|
brotlipy,
|
|
}:
|
|
let
|
|
pname = "brotli-asgi";
|
|
version = "1.5.0";
|
|
in
|
|
buildPythonPackage {
|
|
inherit pname version;
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "fullonic";
|
|
repo = "brotli-asgi";
|
|
rev = "v${version}";
|
|
hash = "sha256-jOow5xrRvuBdg/dVEzAUgs1SxNLZqEItyW9OcvniTSY=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
starlette
|
|
brotli
|
|
];
|
|
|
|
pythonImportsCheck = [ "brotli_asgi" ];
|
|
|
|
nativeCheckInputs = [
|
|
httpx
|
|
requests
|
|
mypy
|
|
brotlipy
|
|
];
|
|
|
|
meta = {
|
|
description = "Compression AGSI middleware using brotli";
|
|
homepage = "https://github.com/fullonic/brotli-asgi";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ happysalada ];
|
|
};
|
|
}
|