2019-02-20 16:31:19 +00:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi, isPy37, fetchpatch, iana-etc, libredirect
|
|
|
|
, case, pytest, boto3, moto, kombu, billiard, pytz, anyjson, amqp, eventlet
|
2018-03-28 19:55:39 +01:00
|
|
|
}:
|
|
|
|
|
2019-01-18 01:35:48 +00:00
|
|
|
buildPythonPackage rec {
|
2018-01-09 10:34:35 +00:00
|
|
|
pname = "celery";
|
2019-02-20 16:31:19 +00:00
|
|
|
version = "4.3.0rc1";
|
2018-01-09 10:34:35 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-02-20 16:31:19 +00:00
|
|
|
sha256 = "1jmg47l0b3bnwmg44x48bwziwyk6xqs1y5plvr99a3ikz1l807yf";
|
2018-01-09 10:34:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# make /etc/protocols accessible to fix socket.getprotobyname('tcp') in sandbox
|
2018-03-28 19:55:39 +01:00
|
|
|
preCheck = stdenv.lib.optionalString stdenv.isLinux ''
|
2018-01-09 10:34:35 +00:00
|
|
|
export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols \
|
|
|
|
LD_PRELOAD=${libredirect}/lib/libredirect.so
|
|
|
|
'';
|
2018-03-28 19:55:39 +01:00
|
|
|
postCheck = stdenv.lib.optionalString stdenv.isLinux ''
|
2018-01-09 10:34:35 +00:00
|
|
|
unset NIX_REDIRECTS LD_PRELOAD
|
|
|
|
'';
|
|
|
|
|
2019-02-20 16:31:19 +00:00
|
|
|
checkInputs = [ case pytest boto3 moto ];
|
2018-01-09 10:34:35 +00: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;
|
|
|
|
};
|
|
|
|
}
|