2022-04-15 01:41:22 +00:00
|
|
|
{ lib
|
2023-10-09 19:29:22 +00:00
|
|
|
, fetchFromGitHub
|
2022-04-15 01:41:22 +00:00
|
|
|
, buildPythonPackage
|
2023-10-09 19:29:22 +00:00
|
|
|
, isPyPy
|
|
|
|
, setuptools
|
2022-04-15 01:41:22 +00:00
|
|
|
, setuptools-scm
|
|
|
|
, flask
|
2020-06-15 15:56:04 +00:00
|
|
|
, brotli
|
2023-10-09 19:29:22 +00:00
|
|
|
, brotlicffi
|
2022-04-15 01:41:22 +00:00
|
|
|
, pytestCheckHook
|
2020-06-15 15:56:04 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.14";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "Flask-Compress";
|
2022-04-15 01:41:22 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "colour-science";
|
|
|
|
repo = "flask-compress";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-eP6i4h+O4vkjlhfy3kyB+PY7iHVzOnRBRD8lj5yHehU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
nativeBuildInputs = [
|
2023-10-09 19:29:22 +00:00
|
|
|
setuptools
|
2022-04-15 01:41:22 +00:00
|
|
|
setuptools-scm
|
|
|
|
];
|
2021-07-03 03:11:41 +00:00
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
flask
|
2023-10-09 19:29:22 +00:00
|
|
|
] ++ lib.optionals (!isPyPy) [
|
2022-04-15 01:41:22 +00:00
|
|
|
brotli
|
2023-10-09 19:29:22 +00:00
|
|
|
] ++ lib.optionals isPyPy [
|
|
|
|
brotlicffi
|
2022-04-15 01:41:22 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-04-15 01:41:22 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"flask_compress"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-10-09 19:29:22 +00:00
|
|
|
description = "Compress responses in your Flask app with gzip, deflate or brotli";
|
2022-04-15 01:41:22 +00:00
|
|
|
homepage = "https://github.com/colour-science/flask-compress";
|
|
|
|
changelog = "https://github.com/colour-science/flask-compress/blob/v${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2023-10-09 19:29:22 +00:00
|
|
|
maintainers = with maintainers; [ nickcao ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|