depot/third_party/nixpkgs/pkgs/tools/misc/chatgpt-cli/default.nix
Default email c7e6337bd0 Project import generated by Copybara.
GitOrigin-RevId: 08e4dc3a907a6dfec8bb3bbf1540d8abbffea22b
2023-04-29 12:46:19 -04:00

32 lines
669 B
Nix

{ lib
, fetchFromGitHub
, buildGoModule
,
}:
buildGoModule rec {
pname = "chatgpt";
version = "1.2.0";
src = fetchFromGitHub {
owner = "j178";
repo = pname;
rev = "v${version}";
hash = "sha256-5tEtkEDQxWFVWyK7uipm20yccCPkCDaMLzS25MmGRbE=";
};
vendorHash = "sha256-q1+4KExXth7+UC8h0+M6ChnW7T1j468umi7Q1jwnzgo=";
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 ];
};
}