Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 fetchFromGitHub, 4 buildPythonPackage, 5 isPyPy, 6 setuptools, 7 setuptools-scm, 8 flask, 9 brotli, 10 brotlicffi, 11 pytestCheckHook, 12}: 13 14buildPythonPackage rec { 15 version = "1.14"; 16 pname = "Flask-Compress"; 17 format = "pyproject"; 18 19 src = fetchFromGitHub { 20 owner = "colour-science"; 21 repo = "flask-compress"; 22 rev = "refs/tags/v${version}"; 23 hash = "sha256-eP6i4h+O4vkjlhfy3kyB+PY7iHVzOnRBRD8lj5yHehU="; 24 }; 25 26 nativeBuildInputs = [ 27 setuptools 28 setuptools-scm 29 ]; 30 31 propagatedBuildInputs = [ 32 flask 33 ] ++ lib.optionals (!isPyPy) [ brotli ] ++ lib.optionals isPyPy [ brotlicffi ]; 34 35 nativeCheckInputs = [ pytestCheckHook ]; 36 37 pythonImportsCheck = [ "flask_compress" ]; 38 39 meta = with lib; { 40 description = "Compress responses in your Flask app with gzip, deflate or brotli"; 41 homepage = "https://github.com/colour-science/flask-compress"; 42 changelog = "https://github.com/colour-science/flask-compress/blob/v${version}/CHANGELOG.md"; 43 license = licenses.mit; 44 maintainers = with maintainers; [ nickcao ]; 45 }; 46}