nixpkgs/pkgs/tools/misc/aichat/default.nix
2024-04-08 00:42:07 +00:00

40 lines
892 B
Nix

{ lib
, stdenv
, darwin
, rustPlatform
, fetchFromGitHub
, pkg-config
}:
rustPlatform.buildRustPackage rec {
pname = "aichat";
version = "0.15.0";
src = fetchFromGitHub {
owner = "sigoden";
repo = "aichat";
rev = "v${version}";
hash = "sha256-xts3/ySE/bEkof6QfVCSiT2gWXHAjdQTFoqrmtidZvs=";
};
cargoHash = "sha256-8exPmH299smIE5lG5VidaWvwZud3bYhqFiH8zBTyJtY=";
nativeBuildInputs = [
pkg-config
];
buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.AppKit
darwin.apple_sdk.frameworks.CoreFoundation
darwin.apple_sdk.frameworks.Security
];
meta = with lib; {
description = "Use GPT-4(V), Gemini, LocalAI, Ollama and other LLMs in the terminal";
homepage = "https://github.com/sigoden/aichat";
license = licenses.mit;
maintainers = with maintainers; [ mwdomino ];
mainProgram = "aichat";
};
}