summary refs log tree commit diff
path: root/pkgs/development/python-modules/aiokafka/default.nix
blob: b31f83dc136dcc0442f9ab388b964de5c1916094 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{ lib
, buildPythonPackage
, fetchFromGitHub
, isPy27
, kafka-python
, cython
, zlib
}:

buildPythonPackage rec {
  pname = "aiokafka";
  version = "0.5.2";

  disabled = isPy27;

  src = fetchFromGitHub {
    owner = "aio-libs";
    repo = "aiokafka";
    rev = "v${version}";
    sha256 = "062kqsq75fi5pbpqf2a8nxm43pxpr6bwplg6bp4nv2a68r850pki";
  };

  nativeBuildInputs = [
    cython
  ];

  buildInputs = [
    zlib
  ];

  propagatedBuildInputs = [
    kafka-python
  ];

  postPatch = ''
    substituteInPlace setup.py \
       --replace "kafka-python==1.4.6" "kafka-python"
  '';

  # checks require running kafka server
  doCheck = false;

  meta = with lib; {
    description = "Kafka integration with asyncio";
    homepage = https://aiokafka.readthedocs.org;
    license = licenses.asl20;
    maintainers = [ maintainers.costrouc ];
  };
}