1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 fetchpatch, 6 7 # build-system 8 setuptools, 9 10 # dependencies 11 flask, 12 13 # tests 14 pytestCheckHook, 15 pytest-cov-stub, 16 pygments, 17}: 18 19buildPythonPackage rec { 20 pname = "flask-gravatar"; 21 version = "0.5.0"; 22 pyproject = true; 23 24 src = fetchPypi { 25 pname = "Flask-Gravatar"; 26 inherit version; 27 sha256 = "YGZfMcLGEokdto/4Aek+06CIHGyOw0arxk0qmSP1YuE="; 28 }; 29 30 patches = [ 31 (fetchpatch { 32 # flask 3.0 compat 33 url = "https://github.com/zzzsochi/Flask-Gravatar/commit/d74d70d9695c464b602c96c2383d391b38ed51ac.patch"; 34 hash = "sha256-tCKkA2io/jhvrh6RhTeEw4AKnIZc9hsqTf2qItUsdjo="; 35 }) 36 ]; 37 38 postPatch = '' 39 sed -i setup.py \ 40 -e "s|tests_require=tests_require,||g" \ 41 -e "s|extras_require=extras_require,||g" \ 42 -e "s|setup_requires=setup_requires,||g" 43 # pep8 is deprecated 44 substituteInPlace pytest.ini \ 45 --replace-fail "--pep8" "" 46 ''; 47 48 build-system = [ setuptools ]; 49 50 dependencies = [ flask ]; 51 52 nativeCheckInputs = [ 53 pytestCheckHook 54 pytest-cov-stub 55 pygments 56 ]; 57 58 pythonImportsCheck = [ "flask_gravatar" ]; 59 60 meta = with lib; { 61 homepage = "https://github.com/zzzsochi/Flask-Gravatar"; 62 description = "Small and simple integration of gravatar into flask"; 63 license = licenses.bsd3; 64 maintainers = with maintainers; [ gador ]; 65 }; 66}