2023-03-30 22:05:00 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
2023-04-29 16:46:19 +00:00
|
|
|
, nix-update-script
|
2023-03-30 22:05:00 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "shell_gpt";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "0.9.0";
|
|
|
|
format = "pyproject";
|
2023-03-30 22:05:00 +00:00
|
|
|
|
|
|
|
src = python3.pkgs.fetchPypi {
|
|
|
|
inherit pname version;
|
2023-05-24 13:37:59 +00:00
|
|
|
sha256 = "sha256-KzW9yI1TGG2hFKeXHFqqYCLw/PB9+lJoTgyWrXxCHpo=";
|
2023-03-30 22:05:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
|
|
|
python3.pkgs.pythonRelaxDepsHook
|
|
|
|
python3
|
|
|
|
pip
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
markdown-it-py
|
|
|
|
rich
|
|
|
|
distro
|
|
|
|
typer
|
|
|
|
requests
|
2023-05-24 13:37:59 +00:00
|
|
|
hatchling
|
2023-03-30 22:05:00 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonRelaxDeps = [ "requests" "rich" "distro" "typer" ];
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
2023-03-30 22:05:00 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|