mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
chatgpt-shell-cli: init at unstable-2023-05-16
This commit is contained in:
parent
9c30003e04
commit
93fdac5bd4
48
pkgs/by-name/ch/chatgpt-shell-cli/package.nix
Normal file
48
pkgs/by-name/ch/chatgpt-shell-cli/package.nix
Normal file
@ -0,0 +1,48 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, jq
|
||||
, curl
|
||||
, glow
|
||||
, makeWrapper
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "chatgpt-shell-cli";
|
||||
|
||||
# no tags
|
||||
version = "master";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
inherit pname version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "0xacx";
|
||||
repo = "chatgpt-shell-cli";
|
||||
rev = version;
|
||||
hash = "sha256-hYLrUya4UCsIB1J/n+jp1jFRCEqnGFJOr3ATxm0zwdY=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
install -Dm755 chatgpt.sh -t $out/bin
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/chatgpt.sh \
|
||||
--prefix PATH : ${lib.makeBinPath [ jq curl glow ]}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/0xacx/chatGPT-shell-cli";
|
||||
description = "Simple shell script to use OpenAI's ChatGPT and DALL-E from the terminal. No Python or JS required.";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ jfvillablanca ];
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user