1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, mock 5, nose 6, pamqp 7}: 8 9buildPythonPackage rec { 10 version = "2.0.1"; 11 pname = "rabbitpy"; 12 13 # No tests in the pypi tarball, so we directly fetch from git 14 src = fetchFromGitHub { 15 owner = "gmr"; 16 repo = pname; 17 rev = version; 18 sha256 = "0m5z3i3d5adrz1wh6y35xjlls3cq6p4y9p1mzghw3k7hdvg26cck"; 19 }; 20 21 propagatedBuildInputs = [ pamqp ]; 22 checkInputs = [ mock nose ]; 23 24 checkPhase = '' 25 runHook preCheck 26 rm tests/integration_tests.py # Impure tests requiring network 27 nosetests tests 28 runHook postCheck 29 ''; 30 31 postPatch = '' 32 # See: https://github.com/gmr/rabbitpy/issues/118 33 substituteInPlace setup.py \ 34 --replace 'pamqp>=2,<3' 'pamqp' 35 ''; 36 37 meta = with lib; { 38 description = "A pure python, thread-safe, minimalistic and pythonic RabbitMQ client library"; 39 homepage = "https://pypi.python.org/pypi/rabbitpy"; 40 license = licenses.bsd3; 41 42 # broken by pamqp==3, tracked in 43 # https://github.com/gmr/rabbitpy/issues/125 44 broken = true; 45 }; 46 47}