Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
60 lines
1.3 KiB
Nix
60 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
rustPlatform,
|
|
pkg-config,
|
|
openssl,
|
|
perl,
|
|
rdkafka,
|
|
# these are features in the cargo, where one may be disabled to reduce the final size
|
|
enableS3 ? true,
|
|
enableAzure ? true,
|
|
}:
|
|
|
|
assert lib.assertMsg (enableS3 || enableAzure) "Either S3 or azure support needs to be enabled";
|
|
rustPlatform.buildRustPackage {
|
|
pname = "kafka-delta-ingest";
|
|
version = "0-unstable-2024-11-05";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "delta-io";
|
|
repo = "kafka-delta-ingest";
|
|
rev = "b7638eda8642985b5bd56741de526ea051d784c0";
|
|
hash = "sha256-fngPFvCxEaHVenySG5FBbVXporu3Hf957iV3rGWsrzE=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
perl
|
|
];
|
|
|
|
buildFeatures = [
|
|
"dynamic-linking"
|
|
] ++ lib.optional enableS3 "s3" ++ lib.optional enableAzure "azure";
|
|
|
|
buildInputs = [
|
|
openssl
|
|
rdkafka
|
|
];
|
|
|
|
cargoLock = {
|
|
lockFile = ./Cargo.lock;
|
|
};
|
|
|
|
postPatch = ''
|
|
ln -s ${./Cargo.lock} Cargo.lock
|
|
'';
|
|
|
|
# many tests seem to require a running kafka instance
|
|
doCheck = false;
|
|
|
|
meta = with lib; {
|
|
broken = stdenv.hostPlatform.isDarwin;
|
|
description = "Highly efficient daemon for streaming data from Kafka into Delta Lake";
|
|
mainProgram = "kafka-delta-ingest";
|
|
homepage = "https://github.com/delta-io/kafka-delta-ingest";
|
|
license = licenses.asl20;
|
|
maintainers = [ ];
|
|
};
|
|
}
|