1{
2 lib,
3 async-timeout,
4 buildPythonPackage,
5 cramjam,
6 cython,
7 fetchFromGitHub,
8 gssapi,
9 packaging,
10 pythonOlder,
11 setuptools,
12 typing-extensions,
13 zlib,
14}:
15
16buildPythonPackage rec {
17 pname = "aiokafka";
18 version = "0.12.0";
19 pyproject = true;
20
21 disabled = pythonOlder "3.9";
22
23 src = fetchFromGitHub {
24 owner = "aio-libs";
25 repo = "aiokafka";
26 tag = "v${version}";
27 hash = "sha256-OU/Kept3TvMfGvVCjSthfZnfTX6/T0Fy3PS/ynrV3Cg=";
28 };
29
30 build-system = [
31 cython
32 setuptools
33 ];
34
35 buildInputs = [ zlib ];
36
37 dependencies = [
38 async-timeout
39 packaging
40 typing-extensions
41 ];
42
43 optional-dependencies = {
44 snappy = [ cramjam ];
45 lz4 = [ cramjam ];
46 zstd = [ cramjam ];
47 gssapi = [ gssapi ];
48 all = [
49 cramjam
50 gssapi
51 ];
52 };
53
54 # Checks require running Kafka server
55 doCheck = false;
56
57 pythonImportsCheck = [ "aiokafka" ];
58
59 meta = with lib; {
60 description = "Kafka integration with asyncio";
61 homepage = "https://aiokafka.readthedocs.org";
62 changelog = "https://github.com/aio-libs/aiokafka/releases/tag/v${version}";
63 license = licenses.asl20;
64 maintainers = [ ];
65 };
66}