nixpkgs/pkgs/tools/misc/chatgpt-cli/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
669 B
Nix
Raw Normal View History

{ lib
, fetchFromGitHub
, buildGoModule
,
}:
buildGoModule rec {
pname = "chatgpt";
2023-04-20 11:41:01 +00:00
version = "1.2.0";
src = fetchFromGitHub {
owner = "j178";
repo = pname;
rev = "v${version}";
2023-04-20 11:41:01 +00:00
hash = "sha256-5tEtkEDQxWFVWyK7uipm20yccCPkCDaMLzS25MmGRbE=";
};
2023-04-20 11:41:01 +00:00
vendorHash = "sha256-q1+4KExXth7+UC8h0+M6ChnW7T1j468umi7Q1jwnzgo=";
2023-04-20 11:41:01 +00:00
subPackages = [ "cmd" ];
postInstall = ''
mv $out/bin/cmd $out/bin/$pname
'';
meta = with lib; {
description = "Interactive CLI for ChatGPT";
homepage = "https://github.com/j178/chatgpt";
license = licenses.mit;
mainProgram = "chatgpt";
maintainers = with maintainers; [ Ruixi-rebirth ];
};
}