From 48b0b3f72a856c3cc6e51a66d29fdd7ee4bf98c1 Mon Sep 17 00:00:00 2001 From: "Wael M. Nasreddine" Date: Mon, 4 Jan 2021 20:08:18 -0800 Subject: [PATCH 1/2] ccloud-cli: update the curl call to fetch the latest version --- pkgs/development/tools/ccloud-cli/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/ccloud-cli/default.nix b/pkgs/development/tools/ccloud-cli/default.nix index c39fa6ca677..e122f6186c1 100644 --- a/pkgs/development/tools/ccloud-cli/default.nix +++ b/pkgs/development/tools/ccloud-cli/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation rec { version = "1.25.0"; # To get the latest version: - # curl -L 'https://s3-us-west-2.amazonaws.com/confluent.cloud?prefix=ccloud-cli/archives/&delimiter=/' | nix run nixpkgs.libxml2 -c xmllint --format - + # curl -L https://cnfl.io/ccloud-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/ccloud-cli/archives/${version}/ccloud_v${version}_darwin_amd64.tar.gz"; sha256 = "0306jg36dpccwyy239r2xvw3bvsrnrdc88390g26fhcb0048qmgb"; From 9b05bad4ba234d7aa73aac84b3babd4e849d8fcd Mon Sep 17 00:00:00 2001 From: "Wael M. Nasreddine" Date: Mon, 4 Jan 2021 20:24:33 -0800 Subject: [PATCH 2/2] ccloud-cli: Declare the actual supported platforms Not all Linux and Darwin platforms are supported, only their x86_64 variants are supported. --- pkgs/development/tools/ccloud-cli/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/ccloud-cli/default.nix b/pkgs/development/tools/ccloud-cli/default.nix index e122f6186c1..3095d661ab3 100644 --- a/pkgs/development/tools/ccloud-cli/default.nix +++ b/pkgs/development/tools/ccloud-cli/default.nix @@ -28,6 +28,13 @@ stdenv.mkDerivation rec { homepage = "https://docs.confluent.io/current/cloud/cli/index.html"; license = licenses.unfree; maintainers = with maintainers; [ kalbasit ]; - platforms = platforms.linux ++ platforms.darwin; + + # 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=ccloud-cli/archives/1.25.0/&delimiter=/%27 + platforms = [ "x86_64-linux" "x86_64-darwin" ]; }; }