summary refs log tree commit diff
path: root/pkgs/development/python-modules/flask-admin/default.nix
blob: 3a2c1fe5e9b63a1cf6a02e2c750479e3d758f7e0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{ lib
, buildPythonPackage
, fetchPypi
, nose
, pillow
, mongoengine
, pymongo
, wtf-peewee
, sqlalchemy
, sqlalchemy-citext
, flask-mongoengine
, flask_sqlalchemy
, flask-babelex
, shapely
, geoalchemy2
, psycopg2
, flask
, wtforms
, isPy27
, enum34
}:

buildPythonPackage rec {
  pname = "flask-admin";
  version = "1.5.3";

  src = fetchPypi {
    pname = "Flask-Admin";
    inherit version;
    sha256 = "ca0be6ec11a6913b73f656c65c444ae5be416c57c75638dd3199376ce6bc7422";
  };

  checkInputs = [
    nose
    pillow
    mongoengine
    pymongo
    wtf-peewee
    sqlalchemy
    sqlalchemy-citext
    flask-mongoengine
    flask_sqlalchemy
    flask-babelex
    shapely
    geoalchemy2
    psycopg2
  ];

  propagatedBuildInputs = [
    flask
    wtforms
  ] ++ lib.optionals isPy27 [ enum34 ];

  checkPhase = ''
    # disable tests that require mongodb, postresql
    nosetests \
     -e "mongoengine" \
     -e "pymongo" \
     -e "test_form_upload" \
     -e "test_postgres" \
     -e "geoa" \
     flask_admin/tests
  '';

  meta = with lib; {
    description = "Simple and extensible admin interface framework for Flask";
    homepage = https://github.com/flask-admin/flask-admin/;
    license = licenses.bsd3;
    maintainers = [ maintainers.costrouc ];
  };
}