Unverified Commit 4b879da1 authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

amazon-q-cli: 1.8.0 -> 1.9.1 (#404584)

parents 75be7b5c 57c566ab
Loading
Loading
Loading
Loading
+21 −13
Original line number Diff line number Diff line
@@ -3,27 +3,37 @@
  fetchFromGitHub,
  rustPlatform,
  protobuf_26,
  versionCheckHook,
}:

rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
  pname = "amazon-q-cli";
  version = "1.8.0";
  version = "1.9.1";

  src = fetchFromGitHub {
    owner = "aws";
    repo = "amazon-q-developer-cli";
    tag = "v${version}";
    hash = "sha256-fOz9oz+xNwX2Bzl6szgQ9oai6lqP+EzbaCNzHPUT2cA=";
    tag = "v${finalAttrs.version}";
    hash = "sha256-BiVCiMBL5LLm8RYw58u6P7yqQq9XnN8b6fTbxNE2QsA=";
  };

  useFetchCargoVendor = true;

  cargoHash = "sha256-H9bCke3vQDuS6RDEg8dzeFiBWCex64A8KSRhfgyp8e8=";
  cargoHash = "sha256-7zUgWLGTZx3Ex7RYxb3eZimWdy6AxkNwpCDUwiAr2JE=";

  cargoBuildFlags = [
    "-p"
    "q_cli"
  ];

  nativeBuildInputs = [
    protobuf_26
  ];

  postInstall = ''
    install -m 0755 $out/bin/q_cli $out/bin/amazon-q
  '';

  cargoTestFlags = [
    "-p"
    "q_cli"
@@ -52,13 +62,10 @@ rustPlatform.buildRustPackage rec {
    "--skip=init_lint_zsh_pre_zshrc"
  ];

  nativeBuildInputs = [
    protobuf_26
  ];

  postInstall = ''
    mv $out/bin/q_cli $out/bin/amazon-q
  '';
  doInstallCheck = true;
  nativeInstallCheckInputs = [ versionCheckHook ];
  versionCheckProgram = "${placeholder "out"}/bin/amazon-q";
  versionCheckProgramArg = "--version";

  meta = {
    description = "Amazon Q Developer AI coding agent CLI";
@@ -67,7 +74,8 @@ rustPlatform.buildRustPackage rec {
      mit
      asl20
    ];
    mainProgram = "amazon-q";
    maintainers = [ lib.maintainers.jamesward ];
    platforms = lib.platforms.linux;
  };
}
})