about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/aiokafka/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/aiokafka/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/aiokafka/default.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/aiokafka/default.nix b/nixpkgs/pkgs/development/python-modules/aiokafka/default.nix
new file mode 100644
index 000000000000..b31f83dc136d
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/aiokafka/default.nix
@@ -0,0 +1,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 ];
+  };
+}