1{ stdenv, buildPythonPackage, fetchPypi, isPy3k, glibcLocales, flask, flask_sqlalchemy, flask_script, alembic }:
2
3with stdenv.lib;
4
5buildPythonPackage rec {
6 pname = "Flask-Migrate";
7 version = "2.5.3";
8
9 src = fetchPypi {
10 inherit pname version;
11 sha256 = "a69d508c2e09d289f6e55a417b3b8c7bfe70e640f53d2d9deb0d056a384f37ee";
12 };
13
14 checkInputs = [ flask_script ] ++ optional isPy3k glibcLocales;
15 propagatedBuildInputs = [ flask flask_sqlalchemy alembic ];
16
17 # tests invoke the flask cli which uses click and therefore has py3k encoding troubles
18 preCheck = optionalString isPy3k ''
19 export LANG="en_US.UTF-8"
20 '';
21
22 meta = {
23 description = "SQLAlchemy database migrations for Flask applications using Alembic";
24 license = licenses.mit;
25 homepage = "https://github.com/miguelgrinberg/Flask-Migrate";
26 broken = !isPy3k;
27 };
28}