1{ lib 2, buildPythonPackage 3, pythonOlder 4, fetchPypi 5, cachelib 6, flask 7, pytest-asyncio 8, pytest-xprocess 9, pytestCheckHook 10}: 11 12buildPythonPackage rec { 13 pname = "Flask-Caching"; 14 version = "2.0.1"; 15 format = "setuptools"; 16 disabled = pythonOlder "3.7"; 17 18 src = fetchPypi { 19 inherit pname version; 20 sha256 = "sha256-EN8gCgPwMq9gB3vv5Bd53ZSJi2fIIEDTTochC3G6Jjg="; 21 }; 22 23 postPatch = '' 24 substituteInPlace setup.py \ 25 --replace "Flask <= 2.1.2" "Flask <= 2.2" 26 ''; 27 28 propagatedBuildInputs = [ 29 cachelib 30 flask 31 ]; 32 33 checkInputs = [ 34 pytest-asyncio 35 pytest-xprocess 36 pytestCheckHook 37 ]; 38 39 disabledTests = [ 40 # backend_cache relies on pytest-cache, which is a stale package from 2013 41 "backend_cache" 42 # optional backends 43 "Redis" 44 "Memcache" 45 ]; 46 47 meta = with lib; { 48 description = "Adds caching support to your Flask application"; 49 homepage = "https://github.com/sh4nks/flask-caching"; 50 license = licenses.bsd3; 51 }; 52}