ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / flask-appbuilder / default.nix
blobb122d6020bc3153aff908fd9589acdef1ae0b8f2
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , fetchpatch
5 , apispec
6 , colorama
7 , click
8 , email-validator
9 , flask
10 , flask-babel
11 , flask-login
12 , flask-openid
13 , flask-sqlalchemy
14 , flask-wtf
15 , flask-jwt-extended
16 , jsonschema
17 , marshmallow
18 , marshmallow-enum
19 , marshmallow-sqlalchemy
20 , python-dateutil
21 , pythonOlder
22 , prison
23 , pyjwt
24 , pyyaml
25 , sqlalchemy-utils
28 buildPythonPackage rec {
29   pname = "flask-appbuilder";
30   version = "4.1.3";
31   format = "setuptools";
33   disabled = pythonOlder "3.7";
35   src = fetchPypi {
36     pname = "Flask-AppBuilder";
37     inherit version;
38     hash = "sha256-8NaTr0RcnsVik/AB4g8QL+FkcRlgkkASFe8fXIvFt/A=";
39   };
41   patches = [
42     (fetchpatch {
43       # https://github.com/dpgaspar/Flask-AppBuilder/pull/1734
44       name = "flask-appbuilder-wtf3.patch";
45       url = "https://github.com/dpgaspar/Flask-AppBuilder/commit/bccb3d719cd3ceb872fe74a9ab304d74664fbf43.patch";
46       hash = "sha256-24mlS3HIs77wKOlwdHah5oks31OOmCBHmcafZT2ITOc=";
47       excludes = [
48         "requirements.txt"
49         "setup.py"
50         "examples/employees/app/views.py"
51       ];
52     })
53   ];
55   propagatedBuildInputs = [
56     apispec
57     colorama
58     click
59     email-validator
60     flask
61     flask-babel
62     flask-login
63     flask-openid
64     flask-sqlalchemy
65     flask-wtf
66     flask-jwt-extended
67     jsonschema
68     marshmallow
69     marshmallow-enum
70     marshmallow-sqlalchemy
71     python-dateutil
72     prison
73     pyjwt
74     pyyaml
75     sqlalchemy-utils
76   ];
78   postPatch = ''
79     substituteInPlace setup.py \
80       --replace "apispec[yaml]>=3.3, <4" "apispec[yaml] >=3.3" \
81       --replace "Flask-WTF>=0.14.2, <1.0.0" "Flask-WTF" \
82       --replace "WTForms<3.0.0" "WTForms" \
83       --replace "marshmallow-sqlalchemy>=0.22.0, <0.27.0" "marshmallow-sqlalchemy" \
84       --replace "prison>=0.2.1, <1.0.0" "prison"
85   '';
87   # Majority of tests require network access or mongo
88   doCheck = false;
90   pythonImportsCheck = [
91     "flask_appbuilder"
92   ];
94   meta = with lib; {
95     description = "Application development framework, built on top of Flask";
96     homepage = "https://github.com/dpgaspar/flask-appbuilder/";
97     license = licenses.bsd3;
98     maintainers = with maintainers; [ costrouc ];
99   };