about summary refs log tree commit diff
path: root/pkgs/tools/misc/aichat/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/misc/aichat/default.nix')
-rw-r--r--pkgs/tools/misc/aichat/default.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/pkgs/tools/misc/aichat/default.nix b/pkgs/tools/misc/aichat/default.nix
index 975fb995bb87d..5052c38b5f2d7 100644
--- a/pkgs/tools/misc/aichat/default.nix
+++ b/pkgs/tools/misc/aichat/default.nix
@@ -4,23 +4,25 @@
 , rustPlatform
 , fetchFromGitHub
 , pkg-config
+, installShellFiles
 }:
 
 rustPlatform.buildRustPackage rec {
   pname = "aichat";
-  version = "0.18.0";
+  version = "0.19.0";
 
   src = fetchFromGitHub {
     owner = "sigoden";
     repo = "aichat";
     rev = "v${version}";
-    hash = "sha256-V7WKzi9PKSek8DlF7QzBEaYn3a+BJzMtKEoi5yMGS/w=";
+    hash = "sha256-/HDuPz60Bj5VEZNlgSpNO+axfu7vZyre0ROS7woxVeg=";
   };
 
-  cargoHash = "sha256-sFRYu1sQ9PdjsBTgajMfvJqA32Q8HZCHs3h2wemb9oY=";
+  cargoHash = "sha256-WI9VT27g1f6XSxBJI5AvLM8wGmzg448wLbg+xeK1J/4=";
 
   nativeBuildInputs = [
     pkg-config
+    installShellFiles
   ];
 
   buildInputs = lib.optionals stdenv.isDarwin [
@@ -29,6 +31,10 @@ rustPlatform.buildRustPackage rec {
     darwin.apple_sdk.frameworks.Security
   ];
 
+  postInstall = ''
+    installShellCompletion ./scripts/completions/aichat.{bash,fish,zsh}
+  '';
+
   meta = with lib; {
     description = "Use GPT-4(V), Gemini, LocalAI, Ollama and other LLMs in the terminal";
     homepage = "https://github.com/sigoden/aichat";