2018-07-14 13:27:39 +02:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi, fetchpatch, iana-etc, libredirect,
|
2018-01-09 11:34:35 +01:00
|
|
|
pytest, case, kombu, billiard, pytz, anyjson, amqp, eventlet
|
2018-03-28 20:55:39 +02:00
|
|
|
}:
|
|
|
|
|
2018-08-13 11:51:42 +02:00
|
|
|
let
|
|
|
|
|
|
|
|
# Needed for celery
|
|
|
|
pytest_32 = pytest.overridePythonAttrs( oldAttrs: rec {
|
|
|
|
version = "3.2.5";
|
|
|
|
src = oldAttrs.src.override {
|
|
|
|
inherit version;
|
|
|
|
sha256 = "6d5bd4f7113b444c55a3bbb5c738a3dd80d43563d063fc42dcb0aaefbdd78b81";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
in buildPythonPackage rec {
|
2018-01-09 11:34:35 +01:00
|
|
|
pname = "celery";
|
2018-10-24 18:45:17 +02:00
|
|
|
version = "4.2.1";
|
2018-01-09 11:34:35 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-10-24 18:45:17 +02:00
|
|
|
sha256 = "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp";
|
2018-01-09 11:34:35 +01:00
|
|
|
};
|
|
|
|
|
2018-07-14 13:27:39 +02:00
|
|
|
# Skip test_RedisBackend.test_timeouts_in_url_coerced
|
|
|
|
# See https://github.com/celery/celery/pull/4847
|
|
|
|
patches = fetchpatch {
|
|
|
|
url = https://github.com/celery/celery/commit/b2668607c909c61becd151905b4525190c19ff4a.patch;
|
|
|
|
sha256 = "11w0z2ycyh8kccj4y69zb7bxppiipcwwigg6jn1q9yrcsvz170jq";
|
|
|
|
};
|
|
|
|
|
2018-01-09 11:34:35 +01:00
|
|
|
# make /etc/protocols accessible to fix socket.getprotobyname('tcp') in sandbox
|
2018-03-28 20:55:39 +02:00
|
|
|
preCheck = stdenv.lib.optionalString stdenv.isLinux ''
|
2018-01-09 11:34:35 +01:00
|
|
|
export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols \
|
|
|
|
LD_PRELOAD=${libredirect}/lib/libredirect.so
|
|
|
|
'';
|
2018-03-28 20:55:39 +02:00
|
|
|
postCheck = stdenv.lib.optionalString stdenv.isLinux ''
|
2018-01-09 11:34:35 +01:00
|
|
|
unset NIX_REDIRECTS LD_PRELOAD
|
|
|
|
'';
|
|
|
|
|
2018-08-30 21:30:19 +02:00
|
|
|
checkInputs = [ pytest_32 case ];
|
2018-01-09 11:34:35 +01:00
|
|
|
propagatedBuildInputs = [ kombu billiard pytz anyjson amqp eventlet ];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://github.com/celery/celery/;
|
|
|
|
description = "Distributed task queue";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|