Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonOlder 5# build inputs 6, starlette 7, brotli 8# check inputs 9, requests 10, mypy 11, brotlipy 12}: 13let 14 pname = "brotli-asgi"; 15 version = "1.4.0"; 16in 17buildPythonPackage { 18 inherit pname version; 19 format = "setuptools"; 20 21 disabled = pythonOlder "3.8"; 22 23 src = fetchFromGitHub { 24 owner = "fullonic"; 25 repo = pname; 26 rev = "v${version}"; 27 hash = "sha256-hQ6CSXnAoUSaKUSmE+2GHZemkFqd8Dc5+OvcUD7/r5Y="; 28 }; 29 30 propagatedBuildInputs = [ 31 starlette 32 brotli 33 ]; 34 35 pythonImportsCheck = [ "brotli_asgi" ]; 36 37 nativeCheckInputs = [ 38 requests 39 mypy 40 brotlipy 41 ]; 42 43 meta = with lib; { 44 description = "A compression AGSI middleware using brotli"; 45 homepage = "https://github.com/fullonic/brotli-asgi"; 46 license = licenses.mit; 47 maintainers = with maintainers; [ happysalada ]; 48 }; 49}