2022-02-10 20:34:41 +00:00
|
|
|
{ stdenv, autoPatchelfHook, fetchurl, lib }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "confluent-cli";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "3.37.0";
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
# To get the latest version:
|
|
|
|
# curl -L https://cnfl.io/cli | sh -s -- -l | grep -v latest | sort -V | tail -n1
|
2023-10-19 13:55:26 +00:00
|
|
|
src = {
|
|
|
|
x86_64-linux = fetchurl {
|
2023-07-15 17:15:38 +00:00
|
|
|
url = "https://s3-us-west-2.amazonaws.com/confluent.cloud/confluent-cli/archives/${version}/confluent_${version}_linux_amd64.tar.gz";
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-vJB/0odVA86fZtRh/Cg5KPD8q8CQFENlRzjpI41UOc8=";
|
|
|
|
};
|
|
|
|
aarch64-linux = fetchurl {
|
|
|
|
url = "https://s3-us-west-2.amazonaws.com/confluent.cloud/confluent-cli/archives/${version}/confluent_${version}_linux_arm64.tar.gz";
|
|
|
|
hash = "sha256-lj7i7oQzX1AfhYfrXDiOjz1/EV4y3/CI4MyPKzNGcss=";
|
|
|
|
};
|
|
|
|
x86_64-darwin = fetchurl {
|
|
|
|
url = "https://s3-us-west-2.amazonaws.com/confluent.cloud/confluent-cli/archives/${version}/confluent_${version}_darwin_amd64.tar.gz";
|
|
|
|
hash = "sha256-gEQBxChsM5CXFRsWBVVcQ88xQ2N4lqkIxHfZKPEMlOY";
|
|
|
|
};
|
|
|
|
aarch64-darwin = fetchurl {
|
|
|
|
url = "https://s3-us-west-2.amazonaws.com/confluent.cloud/confluent-cli/archives/${version}/confluent_${version}_darwin_arm64.tar.gz";
|
|
|
|
hash = "sha256-6i5Z3m0gMzPuqWm/SJOuxjO3ioh/Uhk3A9uykksYfPo=";
|
|
|
|
};
|
|
|
|
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
dontStrip = stdenv.isDarwin;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/{bin,share/doc/confluent-cli}
|
|
|
|
cp confluent $out/bin/
|
|
|
|
cp LICENSE $out/share/doc/confluent-cli/
|
|
|
|
cp -r legal $out/share/doc/confluent-cli/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Confluent CLI";
|
|
|
|
homepage = "https://docs.confluent.io/confluent-cli/current/overview.html";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2022-02-10 20:34:41 +00:00
|
|
|
license = licenses.unfree;
|
2023-11-16 04:20:00 +00:00
|
|
|
maintainers = with maintainers; [ rguevara84 autophagy ];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
# TODO: There's support for i686 systems but I do not have any such system
|
|
|
|
# to build it locally on, it's also unfree so I cannot rely on ofborg to
|
|
|
|
# build it. Get the list of supported system by looking at the list of
|
|
|
|
# files in the S3 bucket:
|
|
|
|
#
|
|
|
|
# https://s3-us-west-2.amazonaws.com/confluent.cloud?prefix=confluent-cli/archives/1.25.0/&delimiter=/%27
|
2023-10-19 13:55:26 +00:00
|
|
|
platforms = platforms.unix;
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
}
|