19 pname = "flask-dramatiq";
23 disabled = pythonOlder "3.6";
25 src = fetchFromGitLab {
27 repo = "flask-dramatiq";
28 rev = "840209e9bf582b4dda468e8bba515f248f3f8534";
29 hash = "sha256-qjV1zyVzHPXMt+oUeGBdP9XVlbcSz2MF9Zygj543T4w=";
33 substituteInPlace pyproject.toml \
34 --replace 'poetry>=0.12' 'poetry-core' \
35 --replace 'poetry.masonry.api' 'poetry.core.masonry.api'
37 patchShebangs --build ./example.py
39 sed -i ./tests/unit/pytest.ini \
40 -e 's:--cov=flask_dramatiq::' \
41 -e 's:--cov-report=term-missing::'
44 nativeBuildInputs = [ poetry-core ];
46 propagatedBuildInputs = [ dramatiq ];
57 ] ++ dramatiq.optional-dependencies.rabbitmq;
59 postgresqlTestSetupPost = ''
60 substituteInPlace config.py \
61 --replace 'SQLALCHEMY_DATABASE_URI = f"postgresql://{PGUSER}:{PGPASSWORD}@{PGHOST}/{PGDATABASE}"' \
62 "SQLALCHEMY_DATABASE_URI = \"postgresql://$PGUSER/$PGDATABASE?host=$PGHOST\""
63 python3 ./example.py db upgrade
72 pythonImportsCheck = [ "flask_dramatiq" ];
74 # Does HTTP requests to localhost
81 description = "Adds Dramatiq support to your Flask application";
82 homepage = "https://gitlab.com/bersace/flask-dramatiq";
83 license = licenses.bsd3;
84 maintainers = with maintainers; [ traxys ];