nixpkgs/pkgs/tools/llm/shell_gpt/default.nix
2024-04-08 06:27:40 +00:00

49 lines
949 B
Nix

{ lib
, python3
, fetchPypi
, nix-update-script
}:
python3.pkgs.buildPythonApplication rec {
pname = "shell_gpt";
version = "1.4.3";
pyproject = true;
src = fetchPypi {
inherit pname version;
sha256 = "sha256-zSgWSC60ypOQ1IENcxObBezAfHosQWBD9ft06yh5iV4=";
};
nativeBuildInputs = with python3.pkgs; [
python3.pkgs.pythonRelaxDepsHook
python3
pip
];
propagatedBuildInputs = with python3.pkgs; [
markdown-it-py
rich
distro
typer
requests
hatchling
openai
instructor
];
pythonRelaxDeps = [ "requests" "rich" "distro" "typer" ];
passthru.updateScript = nix-update-script { };
doCheck = false;
meta = with lib; {
mainProgram = "sgpt";
homepage = "https://github.com/TheR1D/shell_gpt";
description = "Access ChatGPT from your terminal";
platforms = platforms.unix;
license = licenses.mit;
maintainers = with maintainers; [ mglolenstine ];
};
}