1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00
Nick Cao 2024-05-12 17:50:35 -04:00
parent 8dc7602989
commit 4710faecac
No known key found for this signature in database

View file

@ -6,41 +6,48 @@
setuptools,
setuptools-scm,
flask,
zstandard,
brotli,
brotlicffi,
pytestCheckHook,
}:
buildPythonPackage rec {
version = "1.14";
pname = "Flask-Compress";
format = "pyproject";
version = "1.15";
pname = "flask-compress";
pyproject = true;
src = fetchFromGitHub {
owner = "colour-science";
repo = "flask-compress";
rev = "refs/tags/v${version}";
hash = "sha256-eP6i4h+O4vkjlhfy3kyB+PY7iHVzOnRBRD8lj5yHehU=";
hash = "sha256-J7d/OIUsDWM6DoXS0P4EOE3k6txXKm6m4Yq/EJk6FRE=";
};
nativeBuildInputs = [
build-system = [
setuptools
setuptools-scm
];
propagatedBuildInputs = [
dependencies = [
flask
zstandard
] ++ lib.optionals (!isPyPy) [ brotli ] ++ lib.optionals isPyPy [ brotlicffi ];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "flask_compress" ];
meta = with lib; {
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "setuptools_scm[toml]<8" "setuptools_scm"
'';
meta = {
description = "Compress responses in your Flask app with gzip, deflate or brotli";
homepage = "https://github.com/colour-science/flask-compress";
changelog = "https://github.com/colour-science/flask-compress/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ nickcao ];
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ nickcao ];
};
}