depot/third_party/nixpkgs/pkgs/by-name/ai/aichat/package.nix
Luke Granger-Brown f92e137cfb
Some checks failed
/ combine-systems (push) Blocked by required conditions
/ build (x86_64-linux) (push) Failing after 11m44s
/ build (aarch64-linux) (push) Failing after 11m50s
/ build (push) Failing after 16m42s
Merge commit '1e2ed035f4bebc9adad02b365508ad96f7df87c1' into HEAD
2025-03-02 02:23:32 +00:00

51 lines
1.1 KiB
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
installShellFiles,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "aichat";
version = "0.28.0";
src = fetchFromGitHub {
owner = "sigoden";
repo = "aichat";
tag = "v${version}";
hash = "sha256-gs2nkZhz26tmFbAShLsFOgYt/RlPiqKTmdaPSG96m3E=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-cDYxT8WvryTLzBeMtp/iObdSfF84W1XT8ZN/nmoZfFY=";
nativeBuildInputs = [
pkg-config
installShellFiles
];
postInstall = ''
installShellCompletion ./scripts/completions/aichat.{bash,fish,zsh}
'';
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = [ "--version" ];
doInstallCheck = true;
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Use GPT-4(V), Gemini, LocalAI, Ollama and other LLMs in the terminal";
homepage = "https://github.com/sigoden/aichat";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ mwdomino ];
mainProgram = "aichat";
};
}