Merge pull request #259683 from rwaweber/linux_arm64_confluent_cli

confluent-cli: update 3.17.0 -> 3.37.0, add aarch64 darwin and linux
This commit is contained in:
Weijia Wang 2023-10-13 04:26:45 +02:00 committed by GitHub
commit d15078173a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,17 +2,28 @@
stdenv.mkDerivation rec {
pname = "confluent-cli";
version = "3.17.0";
version = "3.37.0";
# To get the latest version:
# curl -L https://cnfl.io/cli | sh -s -- -l | grep -v latest | sort -V | tail -n1
src = fetchurl (if stdenv.hostPlatform.isDarwin then {
url = "https://s3-us-west-2.amazonaws.com/confluent.cloud/confluent-cli/archives/${version}/confluent_${version}_darwin_amd64.tar.gz";
sha256 = "03104736f65591a5be9536424460d9b8c8fc8ac8b5eb646e832371397aaf7cef";
} else {
src = {
x86_64-linux = fetchurl {
url = "https://s3-us-west-2.amazonaws.com/confluent.cloud/confluent-cli/archives/${version}/confluent_${version}_linux_amd64.tar.gz";
sha256 = "3243beca4fefd49cf067f9a4df4f5072a8ac5dac91638e9f10ef0b0544d30445";
});
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}");
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
@ -38,6 +49,6 @@ stdenv.mkDerivation rec {
# files in the S3 bucket:
#
# https://s3-us-west-2.amazonaws.com/confluent.cloud?prefix=confluent-cli/archives/1.25.0/&delimiter=/%27
platforms = [ "x86_64-linux" "x86_64-darwin" ];
platforms = platforms.unix;
};
}