Files
nixpkgs/pkgs/development/python-modules/flask-compress/default.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

60 lines
1.2 KiB
Nix

{
lib,
fetchFromGitHub,
buildPythonPackage,
isPyPy,
setuptools,
setuptools-scm,
flask,
flask-caching,
zstandard,
brotli,
brotlicffi,
pytestCheckHook,
}:
buildPythonPackage rec {
version = "1.17";
pname = "flask-compress";
pyproject = true;
src = fetchFromGitHub {
owner = "colour-science";
repo = "flask-compress";
tag = "v${version}";
hash = "sha256-87fjJxaS7eJbOkSUljnhqFIeahoS4L2tAOhmv4ryVUM=";
};
build-system = [
setuptools
setuptools-scm
];
dependencies = [
flask
zstandard
]
++ lib.optionals (!isPyPy) [ brotli ]
++ lib.optionals isPyPy [ brotlicffi ];
nativeCheckInputs = [
pytestCheckHook
flask-caching
];
pythonImportsCheck = [ "flask_compress" ];
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 = lib.licenses.mit;
maintainers = with lib.maintainers; [ nickcao ];
};
}