2023-10-09 19:29:22 +00:00
|
|
|
{
|
|
|
|
fetchFromGitHub,
|
|
|
|
lib,
|
|
|
|
openssl,
|
|
|
|
rustPlatform,
|
|
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "heygpt";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.4.1";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fuyufjh";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-oP0yIdYytXSsbZ2pNaZ8Rrak1qJsudTe/oP6dGncGUM=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
cargoHash = "sha256-yKHAZpELuUD7wlM3Mi7XvxbKgdU1QxD9hsvIFcj3twE=";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [openssl];
|
|
|
|
|
|
|
|
# Needed to get openssl-sys to use pkg-config.
|
|
|
|
OPENSSL_NO_VENDOR = 1;
|
|
|
|
OPENSSL_LIB_DIR = "${lib.getLib openssl}/lib";
|
|
|
|
OPENSSL_DIR = "${lib.getDev openssl}";
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Simple command-line interface for ChatGPT API";
|
2023-10-09 19:29:22 +00:00
|
|
|
homepage = "https://github.com/fuyufjh/heygpt";
|
|
|
|
license = licenses.mit;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "heygpt";
|
2023-10-09 19:29:22 +00:00
|
|
|
maintainers = with maintainers; [aldoborrero];
|
|
|
|
};
|
|
|
|
}
|