depot/third_party/nixpkgs/pkgs/tools/misc/aichat/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

39 lines
892 B
Nix

{ lib
, stdenv
, darwin
, rustPlatform
, fetchFromGitHub
, pkg-config
}:
rustPlatform.buildRustPackage rec {
pname = "aichat";
version = "0.18.0";
src = fetchFromGitHub {
owner = "sigoden";
repo = "aichat";
rev = "v${version}";
hash = "sha256-V7WKzi9PKSek8DlF7QzBEaYn3a+BJzMtKEoi5yMGS/w=";
};
cargoHash = "sha256-sFRYu1sQ9PdjsBTgajMfvJqA32Q8HZCHs3h2wemb9oY=";
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";
};
}