Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 1.2 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, gevent 5, nose2 6, mock 7, twisted 8, tornado 9}: 10 11buildPythonPackage rec { 12 pname = "pika"; 13 version = "1.3.2"; 14 format = "pyproject"; 15 16 src = fetchFromGitHub { 17 owner = "pika"; 18 repo = "pika"; 19 rev = "refs/tags/${version}"; 20 hash = "sha256-60Z+y3YXazUghfnOy4e7HzM18iju5m5OEt4I3Wg6ty4="; 21 }; 22 23 propagatedBuildInputs = [ gevent tornado twisted ]; 24 25 nativeCheckInputs = [ nose2 mock ]; 26 27 postPatch = '' 28 # don't stop at first test failure 29 # don't run acceptance tests because they access the network 30 # don't report test coverage 31 substituteInPlace nose2.cfg \ 32 --replace "stop = 1" "stop = 0" \ 33 --replace "tests=tests/unit,tests/acceptance" "tests=tests/unit" \ 34 --replace "with-coverage = 1" "with-coverage = 0" 35 ''; 36 37 doCheck = false; # tests require rabbitmq instance, unsure how to skip 38 39 checkPhase = '' 40 runHook preCheck 41 42 PIKA_TEST_TLS=true nose2 -v 43 44 runHook postCheck 45 ''; 46 47 meta = with lib; { 48 description = "Pure-Python implementation of the AMQP 0-9-1 protocol"; 49 homepage = "https://pika.readthedocs.org"; 50 license = licenses.bsd3; 51 maintainers = with maintainers; [ ]; 52 }; 53}