python312Packages.unstructured: 0.16.13 -> 0.16.15 (#377214)
[NixPkgs.git] / pkgs / by-name / ai / aichat / package.nix
blobbb971c677d45002f70d8798b84cd20a0ce25d6cc
1 { lib
2 , stdenv
3 , darwin
4 , rustPlatform
5 , fetchFromGitHub
6 , pkg-config
7 , installShellFiles
8 }:
10 rustPlatform.buildRustPackage rec {
11   pname = "aichat";
12   version = "0.26.0";
14   src = fetchFromGitHub {
15     owner = "sigoden";
16     repo = "aichat";
17     rev = "v${version}";
18     hash = "sha256-Hqrwko/HZTHlKzXuqm835fpygOO9wsQx1XkJddH/EUc=";
19   };
21   cargoHash = "sha256-4CcwzaPIO+upISizpXHGYfKh9YD4foJAqx7TGgLCHZI=";
23   nativeBuildInputs = [
24     pkg-config
25     installShellFiles
26   ];
28   buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
29     darwin.apple_sdk.frameworks.AppKit
30     darwin.apple_sdk.frameworks.CoreFoundation
31     darwin.apple_sdk.frameworks.Security
32   ];
34   postInstall = ''
35     installShellCompletion ./scripts/completions/aichat.{bash,fish,zsh}
36   '';
38   meta = with lib; {
39     description = "Use GPT-4(V), Gemini, LocalAI, Ollama and other LLMs in the terminal";
40     homepage = "https://github.com/sigoden/aichat";
41     license = licenses.mit;
42     maintainers = with maintainers; [ mwdomino ];
43     mainProgram = "aichat";
44   };