2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-06-06 07:54:09 +00:00
|
|
|
, pythonOlder
|
|
|
|
, dataclasses
|
2020-04-24 23:36:52 +00:00
|
|
|
, kafka-python
|
|
|
|
, cython
|
|
|
|
, zlib
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiokafka";
|
2021-06-06 07:54:09 +00:00
|
|
|
version = "0.7.1";
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aio-libs";
|
2021-06-06 07:54:09 +00:00
|
|
|
repo = pname;
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = "v${version}";
|
2021-06-06 07:54:09 +00:00
|
|
|
sha256 = "sha256-D89ppIUliJJMDuCySrZUyN6Rlm01gFskz6ayHmqploc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
zlib
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
kafka-python
|
2021-06-06 07:54:09 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.7") [
|
|
|
|
dataclasses
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# checks require running kafka server
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-06-06 07:54:09 +00:00
|
|
|
pythonImportsCheck = [ "aiokafka" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Kafka integration with asyncio";
|
|
|
|
homepage = "https://aiokafka.readthedocs.org";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|