3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/celery/default.nix

32 lines
961 B
Nix
Raw Normal View History

2018-01-09 10:34:35 +00:00
{ stdenv, buildPythonPackage, fetchPypi, iana-etc, libredirect,
pytest, case, kombu, billiard, pytz, anyjson, amqp, eventlet
2018-03-28 19:55:39 +01:00
}:
2018-01-09 10:34:35 +00:00
buildPythonPackage rec {
pname = "celery";
2018-05-28 13:17:22 +01:00
version = "4.1.1";
2018-01-09 10:34:35 +00:00
src = fetchPypi {
inherit pname version;
2018-05-28 13:17:22 +01:00
sha256 = "d1f2a3359bdbdfb344edce98b8e891f5fe64f8a11c5a45538ec20ac237c971f5";
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
'';
buildInputs = [ pytest case ];
propagatedBuildInputs = [ kombu billiard pytz anyjson amqp eventlet ];
meta = with stdenv.lib; {
homepage = https://github.com/celery/celery/;
description = "Distributed task queue";
license = licenses.bsd3;
};
}