From 060e03e117e2ba5aeeb7dcdeffcd47ce23630fd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Thu, 4 Apr 2024 10:23:30 +0200 Subject: [PATCH] kafka-cmak: init at 3.0.0.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christina Sørensen --- pkgs/by-name/ka/kafka-cmak/package.nix | 49 ++++++++++++++++++++++++++ pkgs/by-name/ka/kafka-cmak/update.sh | 4 +++ 2 files changed, 53 insertions(+) create mode 100644 pkgs/by-name/ka/kafka-cmak/package.nix create mode 100644 pkgs/by-name/ka/kafka-cmak/update.sh diff --git a/pkgs/by-name/ka/kafka-cmak/package.nix b/pkgs/by-name/ka/kafka-cmak/package.nix new file mode 100644 index 000000000000..ee77800e3f88 --- /dev/null +++ b/pkgs/by-name/ka/kafka-cmak/package.nix @@ -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"; + }; +}) diff --git a/pkgs/by-name/ka/kafka-cmak/update.sh b/pkgs/by-name/ka/kafka-cmak/update.sh new file mode 100644 index 000000000000..8d527a01a74a --- /dev/null +++ b/pkgs/by-name/ka/kafka-cmak/update.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p nix-update + +nix-update kafka-cmak