nixpkgs/pkgs/tools/misc/aichat/default.nix
2024-01-03 14:58:04 +01:00

39 lines
823 B
Nix

{ lib
, stdenv
, darwin
, rustPlatform
, fetchFromGitHub
, pkg-config
}:
rustPlatform.buildRustPackage rec {
pname = "aichat";
version = "0.12.0";
src = fetchFromGitHub {
owner = "sigoden";
repo = "aichat";
rev = "v${version}";
hash = "sha256-GWT3NYoEQ6fNLeTdBybJyQ0aqYbtaRzK1A3grUL+4jM=";
};
cargoHash = "sha256-Aah6OcQW2AW+70azLEyS4xnB3AFedvA5MZP+u8RrB9s=";
nativeBuildInputs = [
pkg-config
];
buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.CoreFoundation
darwin.apple_sdk.frameworks.Security
];
meta = with lib; {
description = "Chat with gpt-3.5/chatgpt in terminal.";
homepage = "https://github.com/sigoden/aichat";
license = licenses.mit;
maintainers = with maintainers; [ mwdomino ];
mainProgram = "aichat";
};
}