nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 python3Packages,
4 fetchFromGitHub,
5 versionCheckHook,
6}:
7
8python3Packages.buildPythonApplication rec {
9 pname = "gpt-cli";
10 version = "0.4.3";
11 pyproject = true;
12
13 src = fetchFromGitHub {
14 owner = "kharvd";
15 repo = "gpt-cli";
16 tag = "v${version}";
17 hash = "sha256-BNSMxf3rhKieXYnFqVdpiHmNCDjotJUflwa6mAgsVCc=";
18 };
19
20 build-system = with python3Packages; [
21 pip
22 setuptools
23 ];
24
25 pythonRelaxDeps = true;
26
27 dependencies = with python3Packages; [
28 anthropic
29 attrs
30 black
31 cohere
32 google-genai
33 google-generativeai
34 openai
35 prompt-toolkit
36 pydantic
37 pytest
38 pyyaml
39 rich
40 typing-extensions
41 ];
42
43 nativeCheckInputs =
44 with python3Packages;
45 [
46 pytestCheckHook
47 ]
48 ++ [
49 versionCheckHook
50 ];
51
52 versionCheckProgram = "${placeholder "out"}/bin/gpt";
53
54 meta = {
55 description = "Command-line interface for ChatGPT, Claude and Bard";
56 homepage = "https://github.com/kharvd/gpt-cli";
57 changelog = "https://github.com/kharvd/gpt-cli/releases/tag/${src.tag}";
58 license = lib.licenses.mit;
59 maintainers = with lib.maintainers; [ _404wolf ];
60 mainProgram = "gpt";
61 };
62}