![aleksana](/assets/img/avatar_default.png)
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
61 lines
1.3 KiB
Nix
61 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 = [ ];
|
|
};
|
|
}
|