1{ lib, buildPythonPackage, fetchPypi
2, amqp
3, case
4, Pyro4
5, pytest
6, pytz
7, sqlalchemy
8}:
9
10buildPythonPackage rec {
11 pname = "kombu";
12 version = "4.6.7";
13
14 src = fetchPypi {
15 inherit pname version;
16 sha256 = "67b32ccb6fea030f8799f8fd50dd08e03a4b99464ebc4952d71d8747b1a52ad1";
17 };
18
19 postPatch = ''
20 substituteInPlace requirements/test.txt \
21 --replace "pytest-sugar" ""
22 substituteInPlace requirements/default.txt \
23 --replace "amqp==2.5.1" "amqp~=2.5"
24 '';
25
26 propagatedBuildInputs = [ amqp ];
27
28 checkInputs = [ pytest case pytz Pyro4 sqlalchemy ];
29 # test_redis requires fakeredis, which isn't trivial to package
30 checkPhase = ''
31 pytest --ignore t/unit/transport/test_redis.py
32 '';
33
34 meta = with lib; {
35 description = "Messaging library for Python";
36 homepage = https://github.com/celery/kombu;
37 license = licenses.bsd3;
38 };
39}