2022-06-26 10:26:21 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchPypi
|
|
|
|
, cachelib
|
|
|
|
, flask
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-xprocess
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "Flask-Caching";
|
2022-08-21 13:32:41 +00:00
|
|
|
version = "2.0.1";
|
2022-08-12 12:06:08 +00:00
|
|
|
format = "setuptools";
|
2022-06-26 10:26:21 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-08-21 13:32:41 +00:00
|
|
|
sha256 = "sha256-EN8gCgPwMq9gB3vv5Bd53ZSJi2fIIEDTTochC3G6Jjg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "Flask <= 2.1.2" "Flask <= 2.2"
|
|
|
|
'';
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cachelib
|
|
|
|
flask
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-xprocess
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
disabledTests = [
|
|
|
|
# backend_cache relies on pytest-cache, which is a stale package from 2013
|
|
|
|
"backend_cache"
|
|
|
|
# optional backends
|
|
|
|
"Redis"
|
|
|
|
"Memcache"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Adds caching support to your Flask application";
|
|
|
|
homepage = "https://github.com/sh4nks/flask-caching";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|