git.iko.soy/typeable/nixpkgs
on master help sign in
celery: fix eventlet tests
commit1b628fb02322f1cf6ada397361e19fde55834f85 authorJoerg Thalheim <joerg@thalheim.io> dateMon 25 Sep 2017, 21:42 (9 years ago) parentdcc36a4
1 file changed+6−4
pkgs/top-level/python-packages.nix+6−4
pkgs/top-level/python-packages.nix+6−4
@@ -2606,11 +2606,13 @@ in {
26062606 # https://github.com/celery/celery/pull/3736#issuecomment-274155454 from upstream
26072607 patches = [ ../development/python-modules/celery/fix_endless_python3.6_loop_logger_isa.patch ];
26082608
2609− ## importing of eventlet fails because of:
2610− # _proto_tcp = socket.getprotobyname('tcp')
2611− ## raises an exception in the sandbox
2609+ # make /etc/protocols accessible to fix socket.getprotobyname('tcp') in sandbox
26122610 preCheck = ''
2613− rm ./t/unit/concurrency/test_eventlet.py
2611+ export NIX_REDIRECTS=/etc/protocols=${pkgs.iana-etc}/etc/protocols \
2612+ LD_PRELOAD=${pkgs.libredirect}/lib/libredirect.so
2613+ '';
2614+ postCheck = ''
2615+ unset NIX_REDIRECTS LD_PRELOAD
26142616 '';
26152617
26162618 buildInputs = with self; [ pytest case ];