depot/third_party/nixpkgs/pkgs/by-name/tg/tgpt/package.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

37 lines
831 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "tgpt";
version = "2.7.4";
src = fetchFromGitHub {
owner = "aandrew-me";
repo = "tgpt";
rev = "refs/tags/v${version}";
hash = "sha256-Nk+iLsTXnw6RAc1VztW8ZqeUVsywFjMCOBY2yuWbUXQ=";
};
vendorHash = "sha256-docq/r6yyMPsuUyFbtCMaYfEVL0gLmyTy4PbrAemR00=";
ldflags = [
"-s"
"-w"
];
preCheck = ''
# Remove test which need network access
rm providers/koboldai/koboldai_test.go
'';
meta = with lib; {
description = "ChatGPT in terminal without needing API keys";
homepage = "https://github.com/aandrew-me/tgpt";
changelog = "https://github.com/aandrew-me/tgpt/releases/tag/v${version}";
license = licenses.gpl3Only;
maintainers = with maintainers; [ fab ];
mainProgram = "tgpt";
};
}