2023-04-29 16:46:19 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, setuptools-rust
|
|
|
|
, openssl
|
|
|
|
, pkg-config
|
|
|
|
, cyrus_sasl
|
|
|
|
, protobuf
|
|
|
|
, cmake
|
|
|
|
, gcc
|
2023-05-24 13:37:59 +00:00
|
|
|
, confluent-kafka
|
2023-04-29 16:46:19 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonAtLeast
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bytewax";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "0.16.0";
|
2023-04-29 16:46:19 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonAtLeast "3.11";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bytewax";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-XdFkFhN8Z15Zw5HZ2wmnNFoTzyRtIbB7TAtOpKwuKyY=";
|
2023-04-29 16:46:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Remove docs tests, myst-docutils in nixpkgs is not compatible with package requirements.
|
|
|
|
# Package uses old version.
|
|
|
|
patches = [ ./remove-docs-test.patch ];
|
|
|
|
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src;
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-XGE1qPHi13/+8jjNCIgfzPudw561T0vUfJv5xnKySAg=";
|
2023-04-29 16:46:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
rustPlatform.maturinBuildHook
|
|
|
|
rustPlatform.cargoSetupHook
|
|
|
|
];
|
|
|
|
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
cyrus_sasl
|
|
|
|
protobuf
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
preCheck = ''
|
|
|
|
export PY_IGNORE_IMPORTMISMATCH=1
|
|
|
|
'';
|
2023-04-29 16:46:19 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
confluent-kafka
|
|
|
|
];
|
2023-04-29 16:46:19 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python Stream Processing";
|
|
|
|
homepage = "https://github.com/bytewax/bytewax";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ mslingsby kfollesdal ];
|
|
|
|
# mismatched type expected u8, found i8
|
|
|
|
broken = stdenv.isAarch64;
|
|
|
|
};
|
|
|
|
}
|