diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/rabbitpy/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/rabbitpy/default.nix | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/rabbitpy/default.nix b/nixpkgs/pkgs/development/python-modules/rabbitpy/default.nix index 9e6b9dc0d673..7406faca6014 100644 --- a/nixpkgs/pkgs/development/python-modules/rabbitpy/default.nix +++ b/nixpkgs/pkgs/development/python-modules/rabbitpy/default.nix @@ -1,6 +1,6 @@ { stdenv , buildPythonPackage -, fetchPypi +, fetchFromGitHub , mock , nose , pamqp @@ -10,13 +10,29 @@ buildPythonPackage rec { version = "1.0.0"; pname = "rabbitpy"; - src = fetchPypi { - inherit pname version; - sha256 = "54d33746d0c6a686417cd354346803945df0740b39fb92842d259387100db126"; + # No tests in the pypi tarball, so we directly fetch from git + src = fetchFromGitHub { + owner = "gmr"; + repo = pname; + rev = version; + sha256 = "0fd80zlr4p2sh77rxyyfi9l0h2zqi2csgadr0rhnpgpqsy10qck6"; }; - buildInputs = [ mock nose ]; propagatedBuildInputs = [ pamqp ]; + checkInputs = [ mock nose ]; + + checkPhase = '' + runHook preCheck + rm tests/integration_tests.py # Impure tests requiring network + nosetests tests + runHook postCheck + ''; + + postPatch = '' + # See: https://github.com/gmr/rabbitpy/issues/118 + substituteInPlace setup.py \ + --replace 'pamqp>=1.6.1,<2.0' 'pamqp' + ''; meta = with stdenv.lib; { description = "A pure python, thread-safe, minimalistic and pythonic RabbitMQ client library"; |