mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-23 12:34:15 +00:00

We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
46 lines
1.0 KiB
Nix
46 lines
1.0 KiB
Nix
{ lib
|
|
, stdenv
|
|
, darwin
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, pkg-config
|
|
, installShellFiles
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "aichat";
|
|
version = "0.23.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "sigoden";
|
|
repo = "aichat";
|
|
rev = "v${version}";
|
|
hash = "sha256-75KL1ODA+HyG/YRQIDs3++RgxQHyxKj6zh/2f6zQbdY=";
|
|
};
|
|
|
|
cargoHash = "sha256-pLQ3P+0SdM3QMqO3AdwYOJKFH3Jqz6ID/J1V5dBGG6s=";
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
installShellFiles
|
|
];
|
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
darwin.apple_sdk.frameworks.AppKit
|
|
darwin.apple_sdk.frameworks.CoreFoundation
|
|
darwin.apple_sdk.frameworks.Security
|
|
];
|
|
|
|
postInstall = ''
|
|
installShellCompletion ./scripts/completions/aichat.{bash,fish,zsh}
|
|
'';
|
|
|
|
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";
|
|
};
|
|
}
|