python-celery: fix darwin build

This commit is contained in:
Daiderd Jordan 2018-03-28 20:55:39 +02:00
parent f4b9da7c6a
commit d33a26b370
No known key found for this signature in database
GPG Key ID: D02435D05B810C96

View File

@ -1,6 +1,7 @@
{ stdenv, buildPythonPackage, fetchPypi, iana-etc, libredirect,
pytest, case, kombu, billiard, pytz, anyjson, amqp, eventlet
}:
buildPythonPackage rec {
pname = "celery";
version = "4.1.0";
@ -11,11 +12,11 @@ buildPythonPackage rec {
};
# make /etc/protocols accessible to fix socket.getprotobyname('tcp') in sandbox
preCheck = ''
preCheck = stdenv.lib.optionalString stdenv.isLinux ''
export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols \
LD_PRELOAD=${libredirect}/lib/libredirect.so
'';
postCheck = ''
postCheck = stdenv.lib.optionalString stdenv.isLinux ''
unset NIX_REDIRECTS LD_PRELOAD
'';