1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 poetry-core,
6
7 anthropic,
8 astor,
9 fastapi,
10 google-generativeai,
11 html2image,
12 html2text,
13 inquirer,
14 ipykernel,
15 jupyter-client,
16 litellm,
17 matplotlib,
18 platformdirs,
19 psutil,
20 pyautogui,
21 pydantic,
22 pyperclip,
23 pyyaml,
24 rich,
25 selenium,
26 send2trash,
27 setuptools,
28 shortuuid,
29 six,
30 starlette,
31 tiktoken,
32 tokentrim,
33 toml,
34 typer,
35 uvicorn,
36 webdriver-manager,
37 wget,
38 yaspin,
39
40 nltk,
41}:
42
43buildPythonPackage rec {
44 pname = "open-interpreter";
45 version = "0.4.2";
46 pyproject = true;
47
48 src = fetchFromGitHub {
49 owner = "KillianLucas";
50 repo = "open-interpreter";
51 tag = "v${version}";
52 hash = "sha256-fogCcWAhcrCrrcV0q4oKttkf/GeJaJSZnbgiFxvySs8=";
53 };
54
55 pythonRemoveDeps = [ "git-python" ];
56
57 pythonRelaxDeps = [
58 "anthropic"
59 "google-generativeai"
60 "html2text"
61 "psutil"
62 "rich"
63 "starlette"
64 "tiktoken"
65 "typer"
66 "yaspin"
67 ];
68
69 build-system = [ poetry-core ];
70
71 dependencies = [
72 anthropic
73 astor
74 fastapi
75 google-generativeai
76 html2image
77 html2text
78 inquirer
79 ipykernel
80 jupyter-client
81 litellm
82 matplotlib
83 platformdirs
84 psutil
85 pyautogui
86 pydantic
87 pyperclip
88 pyyaml
89 rich
90 selenium
91 send2trash
92 setuptools
93 shortuuid
94 six
95 starlette
96 tiktoken
97 tokentrim
98 toml
99 typer
100 uvicorn
101 webdriver-manager
102 wget
103 yaspin
104
105 # marked optional in pyproject.toml but still required?
106 nltk
107 ];
108
109 pythonImportsCheck = [ "interpreter" ];
110
111 # Most tests required network access
112 doCheck = false;
113
114 meta = {
115 description = "OpenAI's Code Interpreter in your terminal, running locally";
116 homepage = "https://github.com/KillianLucas/open-interpreter";
117 license = lib.licenses.mit;
118 changelog = "https://github.com/KillianLucas/open-interpreter/releases/tag/v${version}";
119 maintainers = with lib.maintainers; [ happysalada ];
120 mainProgram = "interpreter";
121 };
122}