1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch, 6 7 # build-system 8 poetry-core, 9 10 # docs 11 furo, 12 sphinxHook, 13 14 # runtime 15 babel, 16 flask, 17 jinja2, 18 pytz, 19 20 # tests 21 pytest-mock, 22 pytestCheckHook, 23}: 24 25buildPythonPackage rec { 26 pname = "flask-babel"; 27 version = "4.1.0"; 28 pyproject = true; 29 30 outputs = [ 31 "out" 32 "doc" 33 ]; 34 35 src = fetchFromGitHub { 36 owner = "python-babel"; 37 repo = "flask-babel"; 38 tag = "v${version}"; 39 hash = "sha256-NcwcMLGabWrjbFZhDU1MVWpqAm0prBlqHfTdLV7EqoI="; 40 }; 41 42 patches = [ 43 # Fix list-translations() ordering in tests 44 # https://github.com/python-babel/flask-babel/pull/242 45 (fetchpatch { 46 url = "https://github.com/python-babel/flask-babel/pull/242/commits/999735d825ee2f94701da29bcf819ad70ee03499.patch"; 47 hash = "sha256-vhP/aSWaWpy1sVOJAcrLHJN/yrB+McWO9pkXDI9GeQ4="; 48 }) 49 ]; 50 51 nativeBuildInputs = [ 52 furo 53 sphinxHook 54 ]; 55 56 build-system = [ poetry-core ]; 57 58 dependencies = [ 59 babel 60 flask 61 jinja2 62 pytz 63 ]; 64 65 pythonImportsCheck = [ "flask_babel" ]; 66 67 checkInputs = [ 68 pytest-mock 69 pytestCheckHook 70 ]; 71 72 meta = with lib; { 73 changelog = "https://github.com/python-babel/flask-babel/releases/tag/v${version}"; 74 description = "Adds i18n/l10n support to Flask applications"; 75 longDescription = '' 76 Implements i18n and l10n support for Flask. 77 This is based on the Python babel module as well as pytz both of which are 78 installed automatically for you if you install this library. 79 ''; 80 license = licenses.bsd2; 81 maintainers = with maintainers; [ matejc ]; 82 teams = [ teams.sage ]; 83 homepage = "https://github.com/python-babel/flask-babel"; 84 }; 85}