Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 76 lines 1.5 kB view raw
1{ 2 lib, 3 avro, 4 buildPythonPackage, 5 fastavro, 6 fetchFromGitHub, 7 jsonschema, 8 protobuf, 9 pyflakes, 10 pyrsistent, 11 pytestCheckHook, 12 pythonOlder, 13 rdkafka, 14 requests, 15 requests-mock, 16 setuptools, 17}: 18 19buildPythonPackage rec { 20 pname = "confluent-kafka"; 21 version = "2.5.3"; 22 pyproject = true; 23 24 disabled = pythonOlder "3.7"; 25 26 src = fetchFromGitHub { 27 owner = "confluentinc"; 28 repo = "confluent-kafka-python"; 29 rev = "refs/tags/v${version}"; 30 hash = "sha256-b9RTz4wUtDzGkoeB0cp5vbZEBk8jSw2JiXEx6tUuPVw="; 31 }; 32 33 buildInputs = [ rdkafka ]; 34 35 build-system = [ setuptools ]; 36 37 optional-dependencies = { 38 avro = [ 39 avro 40 fastavro 41 requests 42 ]; 43 json = [ 44 jsonschema 45 pyrsistent 46 requests 47 ]; 48 protobuf = [ 49 protobuf 50 requests 51 ]; 52 schema-registry = [ requests ]; 53 }; 54 55 nativeCheckInputs = [ 56 pyflakes 57 pytestCheckHook 58 requests-mock 59 ] ++ lib.flatten (builtins.attrValues optional-dependencies); 60 61 pythonImportsCheck = [ "confluent_kafka" ]; 62 63 disabledTestPaths = [ 64 "tests/integration/" 65 "tests/test_Admin.py" 66 "tests/test_misc.py" 67 ]; 68 69 meta = with lib; { 70 description = "Confluent's Apache Kafka client for Python"; 71 homepage = "https://github.com/confluentinc/confluent-kafka-python"; 72 changelog = "https://github.com/confluentinc/confluent-kafka-python/blob/v${version}/CHANGELOG.md"; 73 license = licenses.asl20; 74 maintainers = with maintainers; [ mlieberman85 ]; 75 }; 76}