This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

superconfig / 5pkgs / omnigent / package.nix
4.8 kB 179 lines
1{ 2 lib, 3 fetchPypi, 4 python313Packages, 5}: 6let 7 py = python313Packages; 8 9 # 0.18.1 added a runtime dependency on `websockets` (realtime transport) that 10 # nixpkgs' derivation does not declare yet, so its wheel fails the 11 # runtime-deps check. Add it until nixpkgs catches up. 12 openai-agents = py.openai-agents.overridePythonAttrs (o: { 13 dependencies = o.dependencies ++ [ py.websockets ]; 14 }); 15 16 # omnigent-client declares `omnigent` as a dependency, and omnigent declares 17 # omnigent-client: the two are released in lockstep from the same repo. Break 18 # the cycle by dropping the back-reference here; the final application below 19 # provides `omnigent` itself. 20 omnigent-client = py.buildPythonPackage rec { 21 pname = "omnigent_client"; 22 version = "0.9.0"; 23 format = "wheel"; 24 25 src = fetchPypi { 26 inherit pname version format; 27 dist = "py3"; 28 python = "py3"; 29 hash = "sha256-NUF16ZzZkVzohOKznfAPVTT1LI09dXP6gZxlWZzmyrM="; 30 }; 31 32 pythonRemoveDeps = [ "omnigent" ]; 33 34 dependencies = [ 35 py.httpx 36 py.pydantic 37 ]; 38 39 # No pythonImportsCheck: every module imports `omnigent`, which only exists 40 # in the application closure below. 41 doCheck = false; 42 43 meta = { 44 description = "Python client library for the Omnigent server API"; 45 homepage = "https://omnigent.ai"; 46 license = lib.licenses.asl20; 47 }; 48 }; 49 50 omnigent-ui-sdk = py.buildPythonPackage rec { 51 pname = "omnigent_ui_sdk"; 52 version = "0.9.0"; 53 format = "wheel"; 54 55 src = fetchPypi { 56 inherit pname version format; 57 dist = "py3"; 58 python = "py3"; 59 hash = "sha256-xr5rtx2Ac/q8GShkeQudzbKDoLGe5d+Jp7XCiXzU7lQ="; 60 }; 61 62 dependencies = [ 63 omnigent-client 64 py.prompt-toolkit 65 py.pyyaml 66 py.rich 67 ]; 68 69 doCheck = false; 70 71 meta = { 72 description = "Terminal UI SDK for Omnigent"; 73 homepage = "https://omnigent.ai"; 74 license = lib.licenses.asl20; 75 }; 76 }; 77in 78py.buildPythonApplication rec { 79 pname = "omnigent"; 80 version = "0.9.0"; 81 format = "wheel"; 82 83 # The published wheel ships the prebuilt web SPA under 84 # omnigent/server/static/web-ui; the sdist does not. 85 src = fetchPypi { 86 inherit pname version format; 87 dist = "py3"; 88 python = "py3"; 89 hash = "sha256-deNx9SHyaf1ZNkq5+88c1fUieFZastIo8N27Ixy0F1Q="; 90 }; 91 92 # Upper bounds that nixpkgs has already moved past. All of these are 93 # conservative caps in omnigent's pyproject, not known incompatibilities. 94 pythonRelaxDeps = [ 95 "argon2-cffi" # nixpkgs 25.1.0 vs <24 96 "cachetools" # nixpkgs 7.1.4 vs <7 97 "openai" # nixpkgs 2.53.0 vs <2.45 98 "packaging" # nixpkgs 26.2 vs <26 99 "protobuf" # nixpkgs 7.35.1 vs <7 100 "rich" # nixpkgs 15.0.0 vs <15 101 "websockets" # nixpkgs 16.1 vs <15 102 ]; 103 104 dependencies = [ 105 omnigent-client 106 omnigent-ui-sdk 107 ] 108 ++ (with py; [ 109 alembic 110 anyio 111 argon2-cffi 112 cachetools 113 cel-python 114 certifi 115 claude-agent-sdk 116 click 117 fastapi 118 ftfy 119 httpx 120 json5 121 keyring 122 mcp 123 openai 124 openai-agents 125 opentelemetry-exporter-otlp-proto-grpc 126 opentelemetry-exporter-otlp-proto-http 127 opentelemetry-instrumentation-fastapi 128 opentelemetry-instrumentation-httpx 129 opentelemetry-instrumentation-sqlalchemy 130 packaging 131 pexpect 132 prompt-toolkit 133 protobuf 134 psutil 135 pydantic 136 pyjwt 137 pyte 138 python-dateutil 139 pyyaml 140 rich 141 sqlalchemy 142 starlette 143 tiktoken 144 tomlkit 145 uvicorn 146 websockets 147 zstandard 148 ]) 149 ++ py.pyjwt.optional-dependencies.crypto 150 ++ py.uvicorn.optional-dependencies.standard; 151 152 # The CLI respawns itself as `sys.executable -m omnigent.host._daemon_entry` 153 # (cli.py:2945) for the host daemon, and the daemon spawns runners the same 154 # way. That is the *bare* interpreter, without the site-dirs that 155 # wrapPythonPrograms bakes into the console script, so those children die 156 # with ModuleNotFoundError: No module named 'omnigent' and every session hangs 157 # on "the connect daemon did not come online within 30s". Hand them the 158 # transitive dependency closure through PYTHONPATH, which omnigent's own 159 # daemon/runner env allowlist preserves (host/connect.py) while the agent 160 # spawn allowlist drops it (inner/agent_env.py), so it never reaches omp. 161 postFixup = '' 162 buildPythonPath "$out $pythonPath" 163 wrapProgram $out/bin/omnigent --prefix PYTHONPATH : "$program_PYTHONPATH" 164 ''; 165 166 pythonImportsCheck = [ 167 "omnigent" 168 "omnigent_client" 169 "omnigent_ui_sdk" 170 ]; 171 172 meta = { 173 description = "Open-source meta-harness giving a common orchestration layer over AI coding agents"; 174 homepage = "https://omnigent.ai"; 175 license = lib.licenses.asl20; 176 mainProgram = "omnigent"; 177 platforms = lib.platforms.unix; 178 }; 179}