mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 20:55:31 +03:00
amazon-q-cli: add versionCheckHook
This commit is contained in:
parent
33bac1c2cc
commit
57c566abdc
1 changed files with 14 additions and 7 deletions
|
@ -3,6 +3,7 @@
|
|||
fetchFromGitHub,
|
||||
rustPlatform,
|
||||
protobuf_26,
|
||||
versionCheckHook,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
|
@ -24,6 +25,15 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
|||
"-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 (finalAttrs: {
|
|||
"--skip=init_lint_zsh_pre_zshrc"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
protobuf_26
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
install -m 0755 $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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue