kafka-cmak: init at 3.0.0.6

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
This commit is contained in:
Christina Sørensen 2024-04-04 10:23:30 +02:00
parent 4bd2c3fa48
commit 060e03e117
No known key found for this signature in database
GPG Key ID: 26C542FD97F965CE
2 changed files with 53 additions and 0 deletions

View File

@ -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 = ''
runHook preInstall
mkdir -p $out/bin
mv ./* $out
wrapProgram $out/bin/cmak \
--set JAVA_HOME ${jdk.home} \
--prefix PATH : ${lib.makeBinPath [ gawk ]}
runHook postInstall
'';
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";
};
})

View File

@ -0,0 +1,4 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nix-update
nix-update kafka-cmak