2019-11-29 01:22:07 +01:00
|
|
|
{ stdenv, autoPatchelfHook, fetchurl, lib }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ccloud-cli";
|
2021-03-19 23:51:32 +01:00
|
|
|
version = "1.25.0";
|
2019-11-29 01:22:07 +01:00
|
|
|
|
|
|
|
# To get the latest version:
|
2021-01-05 05:08:18 +01:00
|
|
|
# curl -L https://cnfl.io/ccloud-cli | sh -s -- -l | grep -v latest | sort -V | tail -n1
|
2019-11-29 01:22:07 +01:00
|
|
|
src = fetchurl (if stdenv.hostPlatform.isDarwin then {
|
|
|
|
url = "https://s3-us-west-2.amazonaws.com/confluent.cloud/ccloud-cli/archives/${version}/ccloud_v${version}_darwin_amd64.tar.gz";
|
2021-03-19 23:51:32 +01:00
|
|
|
sha256 = "0306jg36dpccwyy239r2xvw3bvsrnrdc88390g26fhcb0048qmgb";
|
2019-11-29 01:22:07 +01:00
|
|
|
} else {
|
|
|
|
url = "https://s3-us-west-2.amazonaws.com/confluent.cloud/ccloud-cli/archives/${version}/ccloud_v${version}_linux_amd64.tar.gz";
|
2021-03-19 23:51:32 +01:00
|
|
|
sha256 = "02sly7cxqlrfd6chamlp05k9ar93mpfrkx5183js0hf595nlki61";
|
2019-11-29 01:22:07 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoPatchelfHook ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/{bin,share/doc/ccloud-cli}
|
|
|
|
cp ccloud $out/bin/
|
|
|
|
cp LICENSE $out/share/doc/ccloud-cli/
|
|
|
|
cp -r legal $out/share/doc/ccloud-cli/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Confluent Cloud CLI";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://docs.confluent.io/current/cloud/cli/index.html";
|
2019-11-29 01:22:07 +01:00
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = with maintainers; [ kalbasit ];
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
};
|
|
|
|
}
|