18 pname = "flask-dramatiq";
22 disabled = pythonOlder "3.6";
24 src = fetchFromGitLab {
26 repo = "flask-dramatiq";
27 rev = "840209e9bf582b4dda468e8bba515f248f3f8534";
28 hash = "sha256-qjV1zyVzHPXMt+oUeGBdP9XVlbcSz2MF9Zygj543T4w=";
32 substituteInPlace pyproject.toml \
33 --replace 'poetry>=0.12' 'poetry-core' \
34 --replace 'poetry.masonry.api' 'poetry.core.masonry.api'
36 patchShebangs --build ./example.py
38 sed -i ./tests/unit/pytest.ini \
39 -e 's:--cov=flask_dramatiq::' \
40 -e 's:--cov-report=term-missing::'
47 propagatedBuildInputs = [
60 ] ++ dramatiq.optional-dependencies.rabbitmq;
62 postgresqlTestSetupPost = ''
63 substituteInPlace config.py \
64 --replace 'SQLALCHEMY_DATABASE_URI = f"postgresql://{PGUSER}:{PGPASSWORD}@{PGHOST}/{PGDATABASE}"' \
65 "SQLALCHEMY_DATABASE_URI = \"postgresql://$PGUSER/$PGDATABASE?host=$PGHOST\""
66 python3 ./example.py db upgrade
69 pytestFlagsArray = [ "-x" "tests/func/" "tests/unit"];
71 pythonImportsCheck = [ "flask_dramatiq" ];
73 # Does HTTP requests to localhost
80 description = "Adds Dramatiq support to your Flask application";
81 homepage = "https://gitlab.com/bersace/flask-dramatiq";
82 license = licenses.bsd3;
83 maintainers = with maintainers; [ traxys ];