Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

kafka-cmak: init at 3.0.0.6 #301475

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions pkgs/by-name/ka/kafka-cmak/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
lib,
stdenvNoCC,
fetchzip,
jdk,
gawk,
makeBinaryWrapper,
}:

stdenvNoCC.mkDerivation (finalAttrs: {
name = "CMAK";
version = "3.0.0.6";

src = fetchzip {
url = "https://github.com/yahoo/CMAK/releases/latest/download/cmak-${finalAttrs.version}.zip";
hash = "sha256-jMF1v2WV8ataFkz2VuVXOE6/QV+Kb0KBVRfj8yKdkUQ=";
};

buildInputs = [
gawk
jdk
];

nativeBuildInputs = [
makeBinaryWrapper
];

installPhase = ''
cafkafk marked this conversation as resolved.
Show resolved Hide resolved
runHook preInstall

mkdir -p $out/bin
mv ./* $out
wrapProgram $out/bin/cmak \
cafkafk marked this conversation as resolved.
Show resolved Hide resolved
--set JAVA_HOME ${jdk.home} \
--prefix PATH : ${lib.makeBinPath [ gawk ]}

runHook postInstall
'';

cafkafk marked this conversation as resolved.
Show resolved Hide resolved
passthru.updateScript = ./update.sh;

meta = with lib; {
description = "Cluster Manager for Apache Kafka, previously known as Kafka Manager";
license = licenses.apsl20;
maintainers = with maintainers; [cafkafk];
platforms = lib.platforms.unix;
mainProgram = "cmak";
};
})
4 changes: 4 additions & 0 deletions pkgs/by-name/ka/kafka-cmak/update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nix-update

nix-update kafka-cmak