1{ lib, buildPythonPackage, fetchPypi, libredirect
2, case, pytest, boto3, moto, kombu, billiard, pytz, anyjson, amqp, eventlet
3}:
4
5buildPythonPackage rec {
6 pname = "celery";
7 version = "4.4.0";
8
9 src = fetchPypi {
10 inherit pname version;
11 sha256 = "d3363bb5df72d74420986a435449f3c3979285941dff57d5d97ecba352a0e3e2";
12 };
13
14 postPatch = ''
15 substituteInPlace requirements/test.txt \
16 --replace "moto==1.3.7" moto \
17 --replace "pytest>=4.3.1,<4.4.0" pytest
18 '';
19
20 # ignore test that's incompatible with pytest5
21 # test_eventlet touches network
22 # test_mongodb requires pymongo
23 checkPhase = ''
24 pytest -k 'not restore_current_app_fallback and not msgpack' \
25 --ignore=t/unit/concurrency/test_eventlet.py \
26 --ignore=t/unit/backends/test_mongodb.py
27 '';
28
29 checkInputs = [ case pytest boto3 moto ];
30 propagatedBuildInputs = [ kombu billiard pytz anyjson amqp eventlet ];
31
32 meta = with lib; {
33 homepage = https://github.com/celery/celery/;
34 description = "Distributed task queue";
35 license = licenses.bsd3;
36 };
37}