Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / flask-admin / default.nix
blobc4d686c014782932d3c295aedfae0985a5d25944
1 { lib
2 , arrow
3 , azure-storage-blob
4 , boto
5 , buildPythonPackage
6 , colour
7 , email-validator
8 , enum34
9 , fetchpatch
10 , fetchPypi
11 , flask
12 , flask-babelex
13 , flask-mongoengine
14 , flask-sqlalchemy
15 , geoalchemy2
16 , mongoengine
17 , pillow
18 , psycopg2
19 , pymongo
20 , pytestCheckHook
21 , pythonOlder
22 , shapely
23 , sqlalchemy
24 , sqlalchemy-citext
25 , sqlalchemy-utils
26 , wtf-peewee
27 , wtforms
30 buildPythonPackage rec {
31   pname = "flask-admin";
32   version = "1.6.1";
33   format = "setuptools";
35   disabled = pythonOlder "3.8";
37   src = fetchPypi {
38     pname = "Flask-Admin";
39     inherit version;
40     hash = "sha256-JMrir4MramEaAdfcNfQtJmwdbHWkJrhp2MskG3gjM2k=";
41   };
43   patches = [
44     # https://github.com/flask-admin/flask-admin/pull/2374
45     (fetchpatch {
46       name = "pillow-10-compatibility.patch";
47       url = "https://github.com/flask-admin/flask-admin/commit/96b92deef8b087e86a9dc3e84381d254ea5c0342.patch";
48       hash = "sha256-iR5kxyeZaEyved5InZuPmcglTD77zW18/eSHGwOuW40=";
49     })
50   ];
52   propagatedBuildInputs = [
53     flask
54     wtforms
55   ];
57   passthru.optional-dependencies = {
58     aws = [
59       boto
60     ];
61     azure = [
62       azure-storage-blob
63     ];
64   };
66   nativeCheckInputs = [
67     arrow
68     colour
69     email-validator
70     flask-babelex
71     flask-mongoengine
72     flask-sqlalchemy
73     geoalchemy2
74     mongoengine
75     pillow
76     psycopg2
77     pymongo
78     pytestCheckHook
79     shapely
80     sqlalchemy
81     sqlalchemy-citext
82     sqlalchemy-utils
83     wtf-peewee
84   ];
86   disabledTests = [
87     # Incompatible with werkzeug 2.1
88     "test_mockview"
89     # Tests are outdated and don't work with peewee
90     "test_nested_flask_views"
91     "test_export_csv"
92     "test_list_row_actions"
93     "test_column_editable_list"
94     "test_column_filters"
95     "test_export_csv"
96   ];
98   disabledTestPaths = [
99     # Tests have additional requirements
100     "flask_admin/tests/geoa/test_basic.py"
101     "flask_admin/tests/mongoengine/test_basic.py"
102     "flask_admin/tests/pymongo/test_basic.py"
103     "flask_admin/tests/sqla/test_basic.py"
104     "flask_admin/tests/sqla/test_form_rules.py"
105     "flask_admin/tests/sqla/test_inlineform.py"
106     "flask_admin/tests/sqla/test_postgres.py"
107     "flask_admin/tests/sqla/test_translation.py"
108     # RuntimeError: Working outside of application context.
109     "flask_admin/tests/sqla/test_multi_pk.py"
110     # Broken test
111     "flask_admin/tests/fileadmin/test_fileadmin.py"
112   ];
114   pythonImportsCheck = [
115     "flask_admin"
116   ];
118   meta = with lib; {
119     description = "Admin interface framework for Flask";
120     homepage = "https://github.com/flask-admin/flask-admin/";
121     changelog = "https://github.com/flask-admin/flask-admin/releases/tag/v${version}";
122     license = licenses.bsd3;
123     maintainers = with maintainers; [ ];
124   };