2023-04-29 16:46:19 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
2024-01-13 08:15:51 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
|
|
|
|
# build-system
|
2023-08-10 07:59:29 +00:00
|
|
|
, cmake
|
2024-01-13 08:15:51 +00:00
|
|
|
, pkg-config
|
|
|
|
, rustPlatform
|
|
|
|
|
|
|
|
# native dependencies
|
2023-08-10 07:59:29 +00:00
|
|
|
, cyrus_sasl
|
2023-04-29 16:46:19 +00:00
|
|
|
, openssl
|
|
|
|
, protobuf
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
# dependencies
|
|
|
|
, jsonpickle
|
|
|
|
|
|
|
|
# optional dependencies
|
|
|
|
, confluent-kafka
|
|
|
|
|
|
|
|
# test
|
|
|
|
, myst-docutils
|
2023-04-29 16:46:19 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bytewax";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "0.17.2";
|
2023-04-29 16:46:19 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2023-04-29 16:46:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bytewax";
|
|
|
|
repo = pname;
|
2023-08-10 07:59:29 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-BecZvBJsaTHIhJhWM9GZldSL6Irrc7fiedulTN9e76I=";
|
2023-08-10 07:59:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
env = {
|
|
|
|
OPENSSL_NO_VENDOR = true;
|
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.
|
2024-01-13 08:15:51 +00:00
|
|
|
patches = [
|
|
|
|
./remove-docs-test.patch
|
|
|
|
];
|
2023-04-29 16:46:19 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
cargoDeps = rustPlatform.importCargoLock {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
|
|
|
"columnation-0.1.0" = "sha256-RAyZKR+sRmeWGh7QYPZnJgX9AtWqmca85HcABEFUgX8=";
|
|
|
|
"timely-0.12.0" = "sha256-sZuVLBDCXurIe38m4UAjEuFeh73VQ5Jawy+sr3U/HbI=";
|
2024-01-13 08:15:51 +00:00
|
|
|
"libsqlite3-sys-0.26.0" = "sha256-WpJA+Pm5dWKcdUrP0xS5ps/oE/yAXuQvvsdyDfDet1o=";
|
2023-08-10 07:59:29 +00:00
|
|
|
};
|
2023-04-29 16:46:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
rustPlatform.maturinBuildHook
|
|
|
|
rustPlatform.cargoSetupHook
|
|
|
|
];
|
|
|
|
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
cyrus_sasl
|
|
|
|
protobuf
|
|
|
|
];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
jsonpickle
|
|
|
|
];
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
kafka = [
|
|
|
|
confluent-kafka
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
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 = [
|
2024-01-13 08:15:51 +00:00
|
|
|
myst-docutils
|
2023-05-24 13:37:59 +00:00
|
|
|
pytestCheckHook
|
2023-08-10 07:59:29 +00:00
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# dependens on an old myst-docutils version
|
|
|
|
"docs"
|
|
|
|
];
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"bytewax"
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
2023-04-29 16:46:19 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python Stream Processing";
|
|
|
|
homepage = "https://github.com/bytewax/bytewax";
|
2023-08-10 07:59:29 +00:00
|
|
|
changelog = "https://github.com/bytewax/bytewax/releases/tag/v${version}";
|
2023-04-29 16:46:19 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ mslingsby kfollesdal ];
|
|
|
|
# mismatched type expected u8, found i8
|
|
|
|
broken = stdenv.isAarch64;
|
|
|
|
};
|
|
|
|
}
|