{ stdenv, buildPythonPackage, fetchPypi, pytest, six, mock }: buildPythonPackage rec { name = "${pname}-${version}"; version = "1.4.2"; pname = "kafka-python"; src = fetchPypi { inherit pname version; sha256 = "6a5c516f540f4b13b78c64a85dd42dc38fe29257e2fae6393fc5daff9106389b"; }; checkInputs = [ pytest six mock ]; checkPhase = '' py.test ''; # Upstream uses tox but we don't on Nix. Running tests manually produces however # from . import unittest # E ImportError: cannot import name 'unittest' doCheck = false; meta = with stdenv.lib; { description = "Pure Python client for Apache Kafka"; homepage = https://github.com/dpkp/kafka-python; license = licenses.asl20; maintainers = with maintainers; [ ]; }; }