1{ lib
2, fetchFromGitHub
3, buildGoModule
4,
5}:
6buildGoModule rec {
7 pname = "chatgpt";
8 version = "1.2.0";
9
10 src = fetchFromGitHub {
11 owner = "j178";
12 repo = pname;
13 rev = "v${version}";
14 hash = "sha256-5tEtkEDQxWFVWyK7uipm20yccCPkCDaMLzS25MmGRbE=";
15 };
16
17 vendorHash = "sha256-q1+4KExXth7+UC8h0+M6ChnW7T1j468umi7Q1jwnzgo=";
18
19 subPackages = [ "cmd" ];
20
21 postInstall = ''
22 mv $out/bin/cmd $out/bin/$pname
23 '';
24
25 meta = with lib; {
26 description = "Interactive CLI for ChatGPT";
27 homepage = "https://github.com/j178/chatgpt";
28 license = licenses.mit;
29 mainProgram = "chatgpt";
30 maintainers = with maintainers; [ Ruixi-rebirth ];
31 };
32}