From bca930867614ab4edcb9164a0ca6dce7fc6d4b17 Mon Sep 17 00:00:00 2001 From: MGlolenstine Date: Mon, 20 Mar 2023 19:53:59 +0100 Subject: [PATCH] shell_gpt: init at 0.7.3 --- pkgs/tools/misc/shell_gpt/default.nix | 40 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 42 insertions(+) create mode 100644 pkgs/tools/misc/shell_gpt/default.nix diff --git a/pkgs/tools/misc/shell_gpt/default.nix b/pkgs/tools/misc/shell_gpt/default.nix new file mode 100644 index 000000000000..695ceb15fe04 --- /dev/null +++ b/pkgs/tools/misc/shell_gpt/default.nix @@ -0,0 +1,40 @@ +{ lib +, python3 +}: + +python3.pkgs.buildPythonApplication rec { + pname = "shell_gpt"; + version = "0.7.3"; + + src = python3.pkgs.fetchPypi { + inherit pname version; + sha256 = "sha256-lS8zLtsh8Uz782KJwHqifEQnWQswbCXRVIfXWAmWtvI="; + }; + + nativeBuildInputs = with python3.pkgs; [ + python3.pkgs.pythonRelaxDepsHook + python3 + pip + ]; + + propagatedBuildInputs = with python3.pkgs; [ + markdown-it-py + rich + distro + typer + requests + ]; + + pythonRelaxDeps = [ "requests" "rich" "distro" "typer" ]; + + doCheck = false; + + meta = with lib; { + mainProgram = "sgpt"; + homepage = "https://github.com/TheR1D/shell_gpt"; + description = "Access ChatGPT from your terminal"; + platforms = platforms.linux; + license = licenses.mit; + maintainers = with maintainers; [ mglolenstine ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2040db59dfae..00fd1bb285e3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33275,6 +33275,8 @@ with pkgs; shadowfox = callPackage ../tools/networking/shadowfox { }; + shell_gpt = callPackage ../tools/misc/shell_gpt { }; + shfmt = callPackage ../tools/text/shfmt { }; shipments = callPackage ../applications/misc/shipments { };