Compare commits

..

6 Commits

Author SHA1 Message Date
4bc5df11c4 feat(packages): add ds4 package with ROCm/Strix Halo backend
Some checks failed
CI / check (push) Has been cancelled
Add antirez/ds4 — DeepSeek V4 Flash/PRO local inference engine built
with the ROCm strix-halo target for AMD Radeon 8060S (gfx1151).
Wires up all 8 ROCm transitive dependencies (clr, hipblas, hipblas-common,
hipblaslt, hipcub, rocblas, rocprim, rocwmma) via explicit include/lib paths.
2026-06-19 23:06:42 +03:00
6afcc00165 feat(packages): add omniroute package
Some checks failed
CI / check (push) Has been cancelled
Add OmniRoute v3.8.28 - a unified AI router aggregating 160+ providers
with auto fallback, MCP/A2A support, and OpenAI-compatible APIs.

Uses a hybrid approach: GitHub source for dependency resolution via
fetchNpmDeps, combined with pre-built dist/ from the npm tarball to
avoid the complex Next.js build in the Nix sandbox.
2026-06-19 09:39:05 +03:00
744d2419e6 feat(packages): add relay-free-llm package
Add RelayFreeLLM, a RESTful API gateway that routes prompts to multiple
AI providers (Gemini, Cerebras, Groq, Mistral, etc.) with failover and
intent-based routing. Includes local cerebras-cloud-sdk build since it is
not yet in nixpkgs.
2026-06-19 08:49:29 +03:00
8d8f56664d fix(packages): correct pname typo, add missing category, add sed warning, fix indent
- graphify: fix pname typo graphifyy -> graphify
- container-use: add missing passthru.category
- radar: add brittleness warning on postPatch sed block
- freebuff: fix extractNpmPkg indentation
2026-06-17 14:11:20 +03:00
eae85ce989 chore: remove goose-cli package and cleanup configuration
Some checks failed
CI / check (push) Has been cancelled
2026-06-16 22:01:18 +03:00
4bf6faa2a7 chore: remove goose-cli package and cleanup configuration
- Delete packages/goose-cli/ (librusty_v8 pre-built binary dependency)
- Remove global nixpkgs.config.allowUnfree from flake.nix
  (goose-cli was the only package requiring unfree binaries)
- Add .claude/ to .gitignore
- Update README.md and AGENTS.md to remove all goose-cli references
2026-06-16 21:41:30 +03:00
19 changed files with 383 additions and 235 deletions

1
.gitignore vendored
View File

@@ -1,5 +1,6 @@
.qoder
.qwen
.claude/
result
result-*
.direnv/

View File

@@ -87,13 +87,7 @@ nix-overlay/
├── packages/
│ ├── default/ # Meta-package listing all visible packages
│ │ ├── default.nix
│ │ └── package.nix
│ ├── goose-cli/ # Example package: Goose AI agent CLI
│ │ ├── default.nix
│ │ ├── package.nix # Main package definition
│ │ ├── fetchers.nix # Custom fetchers (if needed)
│ │ ├── librusty_v8.nix # V8 library pre-built binary
│ │ └── update.py # Update script for version bumps
│ │ └── package.nix
│ └── flake-inputs/ # Utility to cache all flake inputs
│ └── default.nix
├── README.md # User-facing documentation
@@ -232,7 +226,7 @@ When adding a new package:
```bash
# Build specific package
nix build .#goose-cli
nix build .#mcp-gateway
# Build all packages for current system
nix build .#packages
@@ -319,7 +313,6 @@ nix build .#<package-name>
### Package-Specific Notes
- **goose-cli**: Also updates `librusty_v8` hashes automatically via the custom fetcher
- **mcp-gateway**: Standard Rust package, `nix-update` handles version + cargoHash
- **skillsmcp**: Pinned to a commit hash; use `--version=branch=main` or specify the target commit with `--commit`

View File

@@ -15,8 +15,8 @@ A custom Nix overlay and flake providing additional packages not found in upstre
| `aionui` | Free, open-source, Cowork app with AI Agents | AI Coding Agents |
| `container-use` | Containerized environments for coding agents | AI Coding Agents |
| `desloppify` | Multi-language codebase health scanner and technical debt tracker for AI agents | AI Coding Agents |
| `ds4` | DeepSeek 4 Flash and PRO local inference engine for ROCm (Strix Halo) | AI Inference |
| `freebuff` | The world's strongest free coding agent | AI Coding Agents |
| `goose-cli` | CLI for Goose - a local, extensible, open source AI agent that automates engineering tasks | AI Coding Agents |
| `graphify` | Turn any folder of code, docs, papers, images, or videos into a queryable knowledge graph | AI Coding Agents |
| `hipengine` | ROCm-native local LLM inference engine with torch-free runtime for AMD RDNA GPUs | AI Inference |
| `mcp-gateway` | Universal Model Context Protocol gateway that sits between AI client and MCP tools/servers | MCP Servers |
@@ -24,6 +24,8 @@ A custom Nix overlay and flake providing additional packages not found in upstre
| `kubernetes-mcp-server` | Model Context Protocol (MCP) server for Kubernetes and OpenShift | MCP Servers |
| `loop` | Corporate messenger for your team | Communication |
| `radar` | Modern Kubernetes visibility — topology, event timeline, service traffic, resource browsing, Helm management, and GitOps support | Kubernetes |
| `omniroute` | Unified AI router with 160+ providers, auto fallback, MCP/A2A, OpenAI-compatible APIs | AI LLM Gateway |
| `relay-free-llm` | RESTful API to route user prompts to various AI model providers with automatic failover and intent-based routing | AI LLM Gateway |
| `stakpak` | DevOps AI agent that generates infrastructure code, debugs Kubernetes, configures CI/CD, and automates deployments | AI Agents |
## Usage
@@ -74,10 +76,10 @@ With flakes enabled:
```bash
# Try a package
nix run git+https://git.millerson.name/alex/millerson-overlay.nix.git#goose-cli
nix run git+https://git.millerson.name/alex/millerson-overlay.nix.git#mcp-gateway
# Install permanently
nix profile install git+https://git.millerson.name/alex/millerson-overlay.nix.git#goose-cli
nix profile install git+https://git.millerson.name/alex/millerson-overlay.nix.git#mcp-gateway
```
## Development
@@ -94,7 +96,7 @@ nix profile install git+https://git.millerson.name/alex/millerson-overlay.nix.gi
nix build .#packages
# Build specific package
nix build .#goose-cli
nix build .#mcp-gateway
# Enter development shell
nix develop
@@ -114,15 +116,17 @@ nix-overlay/
│ ├── container-use/ # Containerized environments for coding agents
│ ├── default/ # Meta-package listing all packages
│ ├── desloppify/ # Codebase health scanner for AI agents
│ ├── ds4/ # DeepSeek V4 Flash/PRO inference engine (ROCm)
│ ├── flake-inputs/ # Utility for caching flake inputs
│ ├── freebuff/ # Free coding agent (Codebuff)
│ ├── goose-cli/ # Goose AI agent CLI
│ ├── graphify/ # Knowledge graph generator for code folders
│ ├── hipengine/ # ROCm-native LLM inference engine for AMD GPUs
│ ├── kubernetes-mcp-server/ # MCP server for Kubernetes and OpenShift
│ ├── loop/ # Corporate messenger for your team
│ ├── mcp-gateway/ # MCP protocol gateway
│ ├── omniroute/ # Unified AI router with 160+ providers
│ ├── radar/ # Kubernetes UI (topology, timeline, Helm, GitOps)
│ ├── relay-free-llm/ # AI model provider routing gateway
│ ├── skillsmcp/ # MCP server for Agent Skills
│ └── stakpak/ # DevOps AI agent for infrastructure automation
└── README.md

View File

@@ -33,9 +33,6 @@
let
blueprintOutputs = inputs.blueprint {
inherit inputs;
# allowUnfree is needed for packages that depend on pre-built
# binaries (e.g., goose-cli's librusty_v8)
nixpkgs.config.allowUnfree = true;
};
in
blueprintOutputs

View File

@@ -34,6 +34,7 @@ buildGoModule rec {
];
passthru = {
category = "AI Coding Agents";
updateScript = [
"nix-update"
"--flake"

2
packages/ds4/default.nix Normal file
View File

@@ -0,0 +1,2 @@
{ pkgs, ... }:
pkgs.callPackage ./package.nix { }

102
packages/ds4/package.nix Normal file
View File

@@ -0,0 +1,102 @@
{
lib,
stdenv,
fetchFromGitHub,
gnumake,
rocmPackages,
autoPatchelfHook,
}:
stdenv.mkDerivation {
pname = "ds4";
version = "0-unstable-2026-06-17";
src = fetchFromGitHub {
owner = "antirez";
repo = "ds4";
rev = "80ebbc396aee40eedc1d829222f3362d10fa4c6c";
hash = "sha256-Ieuc72GHZs20ModQfnvI5Me31n4Pj+WFYtsuqaKJceo=";
};
nativeBuildInputs = [
gnumake
rocmPackages.hipcc
autoPatchelfHook
];
buildInputs = [
rocmPackages.clr
rocmPackages.hipblas
rocmPackages.hipblas-common
rocmPackages.hipblaslt
rocmPackages.hipcub
rocmPackages.rocblas
rocmPackages.rocprim
rocmPackages.rocwmma
];
# STRIXHALO.md: rocwmma/internal/ headers may be missing in distro packages.
# nixpkgs builds rocwmma from source so all headers (including internal/) are present.
# ROCM_ARCH defaults to gfx1151 (Strix Halo / Radeon 8060S) in the upstream Makefile.
buildPhase = ''
runHook preBuild
make strix-halo -j"$NIX_BUILD_CORES" \
HIPCC="${rocmPackages.hipcc}/bin/hipcc" \
ROCM_CFLAGS="-O3 -ffast-math -g -fno-finite-math-only -pthread -D__HIP_PLATFORM_AMD__ -Wno-unused-command-line-argument --offload-arch=gfx1151 \
-I${rocmPackages.clr}/include \
-I${rocmPackages.hipblas}/include \
-I${rocmPackages.hipblas-common}/include \
-I${rocmPackages.hipblaslt}/include \
-I${rocmPackages.hipcub}/include \
-I${rocmPackages.rocblas}/include \
-I${rocmPackages.rocprim}/include \
-I${rocmPackages.rocwmma}/include" \
ROCM_LDLIBS="-lm -pthread \
-L${rocmPackages.hipblas}/lib -lhipblas \
-L${rocmPackages.hipblaslt}/lib -lhipblaslt \
-L${rocmPackages.rocblas}/lib -lrocblas \
-L${rocmPackages.clr}/lib -lamdhip64"
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp ds4 ds4-server ds4-bench ds4-eval ds4-agent $out/bin/
runHook postInstall
'';
passthru = {
category = "AI Inference";
updateScript = [
"nix-update"
"--flake"
"--version=branch=main"
".#ds4"
];
};
meta = {
description = "DeepSeek 4 Flash and PRO local inference engine for ROCm (Strix Halo)";
longDescription = ''
DS4 is a self-contained local inference engine specifically built for
DeepSeek V4 Flash and PRO. It bundles a CLI, HTTP server, and native
coding agent. This package is built with the ROCm backend for AMD
Strix Halo GPUs (gfx1151, Radeon 8060S).
Runtime requirements (from STRIXHALO.md):
- User must be in 'render' and 'video' groups for /dev/kfd and DRM access
- GPU-visible memory must be increased via kernel parameters:
amd_iommu=off amdgpu.gttsize=126976 ttm.pages_limit=32505856 ttm.page_pool_size=32505856
'';
homepage = "https://github.com/antirez/ds4";
changelog = "https://github.com/antirez/ds4/commits/main";
license = lib.licenses.mit;
platforms = [ "x86_64-linux" ];
mainProgram = "ds4";
};
}

View File

@@ -59,74 +59,77 @@ stdenv.mkDerivation rec {
src = freebuffSrc;
nativeBuildInputs = [ makeWrapper patchelf ];
nativeBuildInputs = [
makeWrapper
patchelf
];
dontStrip = true;
dontPatchelf = true;
installPhase = ''
runHook preInstall
runHook preInstall
# Extract and patch the pre-built binary for NixOS compatibility
mkdir -p "$out/bin" /tmp/fb-engine
tar xzf "${binarySrc}" -C /tmp/fb-engine --strip-components=0
cp /tmp/fb-engine/freebuff "$out/bin/freebuff-engine"
chmod 755 "$out/bin/freebuff-engine"
# Extract and patch the pre-built binary for NixOS compatibility
mkdir -p "$out/bin" /tmp/fb-engine
tar xzf "${binarySrc}" -C /tmp/fb-engine --strip-components=0
cp /tmp/fb-engine/freebuff "$out/bin/freebuff-engine"
chmod 755 "$out/bin/freebuff-engine"
patchelf \
--set-interpreter "${glibc}/lib/ld-linux-x86-64.so.2" \
--set-rpath "${glibc}/lib:" \
"$out/bin/freebuff-engine"
patchelf \
--set-interpreter "${glibc}/lib/ld-linux-x86-64.so.2" \
--set-rpath "${glibc}/lib:" \
"$out/bin/freebuff-engine"
if [ -f /tmp/fb-engine/tree-sitter.wasm ]; then
cp /tmp/fb-engine/tree-sitter.wasm "$out/bin/"
fi
if [ -f /tmp/fb-engine/tree-sitter.wasm ]; then
cp /tmp/fb-engine/tree-sitter.wasm "$out/bin/"
fi
rm -rf /tmp/fb-engine
rm -rf /tmp/fb-engine
# Extract npm dependencies from pre-fetched tarballs
extractNpmPkg() {
local src="$1" target="$2"
mkdir -p "$target"
tar xzf "$src" -C "$target" --strip-components=1
# Extract npm dependencies from pre-fetched tarballs
extractNpmPkg() {
local src="$1" target="$2"
mkdir -p "$target"
tar xzf "$src" -C "$target" --strip-components=1
}
mkdir -p "$out/lib/node_modules/tar"
mkdir -p "$out/lib/node_modules/chownr"
mkdir -p "$out/lib/node_modules/minipass"
mkdir -p "$out/lib/node_modules/minizlib"
mkdir -p "$out/lib/node_modules/yallist"
mkdir -p "$out/lib/node_modules/@isaacs/fs-minipass"
extractNpmPkg "${pkgTar}" "$out/lib/node_modules/tar"
extractNpmPkg "${pkgChownr}" "$out/lib/node_modules/chownr"
extractNpmPkg "${pkgMinipass}" "$out/lib/node_modules/minipass"
extractNpmPkg "${pkgMinizlib}" "$out/lib/node_modules/minizlib"
extractNpmPkg "${pkgYallist}" "$out/lib/node_modules/yallist"
extractNpmPkg "${pkgFsMinipass}" "$out/lib/node_modules/@isaacs/fs-minipass"
# Launcher: run the patched engine directly from nix-store
cat > "$out/bin/launcher.js" << LAUNCHER_EOF
#!/usr/bin/env node
const { spawn } = require('child_process');
const TERMINAL_RESET = '\x1b[?1049l\x1b[?1000l\x1b[?1002l\x1b[?1003l\x1b[?1006l\x1b[?2004l\x1b[?25h';
const engine = '${placeholder "out"}/bin/freebuff-engine';
function reset() {
try { if (process.stdin.isTTY && process.stdin.setRawMode) process.stdin.setRawMode(false); } catch(e){}
try { if (process.stdout.isTTY) process.stdout.write(TERMINAL_RESET); } catch(e){}
}
mkdir -p "$out/lib/node_modules/tar"
mkdir -p "$out/lib/node_modules/chownr"
mkdir -p "$out/lib/node_modules/minipass"
mkdir -p "$out/lib/node_modules/minizlib"
mkdir -p "$out/lib/node_modules/yallist"
mkdir -p "$out/lib/node_modules/@isaacs/fs-minipass"
const child = spawn(engine, process.argv.slice(2), { stdio: 'inherit' });
child.on('exit', (code, signal) => { reset(); process.exit(signal ? 1 : code || 0); });
child.on('error', (e) => { console.error('Failed to start freebuff:', e.message); process.exit(1); });
LAUNCHER_EOF
extractNpmPkg "${pkgTar}" "$out/lib/node_modules/tar"
extractNpmPkg "${pkgChownr}" "$out/lib/node_modules/chownr"
extractNpmPkg "${pkgMinipass}" "$out/lib/node_modules/minipass"
extractNpmPkg "${pkgMinizlib}" "$out/lib/node_modules/minizlib"
extractNpmPkg "${pkgYallist}" "$out/lib/node_modules/yallist"
extractNpmPkg "${pkgFsMinipass}" "$out/lib/node_modules/@isaacs/fs-minipass"
makeWrapper "${nodejs}/bin/node" "$out/bin/freebuff" \
--set NODE_PATH "$out/lib/node_modules" \
--add-flags "$out/bin/launcher.js"
# Launcher: run the patched engine directly from nix-store
cat > "$out/bin/launcher.js" << LAUNCHER_EOF
#!/usr/bin/env node
const { spawn } = require('child_process');
const TERMINAL_RESET = '\x1b[?1049l\x1b[?1000l\x1b[?1002l\x1b[?1003l\x1b[?1006l\x1b[?2004l\x1b[?25h';
const engine = '${placeholder "out"}/bin/freebuff-engine';
function reset() {
try { if (process.stdin.isTTY && process.stdin.setRawMode) process.stdin.setRawMode(false); } catch(e){}
try { if (process.stdout.isTTY) process.stdout.write(TERMINAL_RESET); } catch(e){}
}
const child = spawn(engine, process.argv.slice(2), { stdio: 'inherit' });
child.on('exit', (code, signal) => { reset(); process.exit(signal ? 1 : code || 0); });
child.on('error', (e) => { console.error('Failed to start freebuff:', e.message); process.exit(1); });
LAUNCHER_EOF
makeWrapper "${nodejs}/bin/node" "$out/bin/freebuff" \
--set NODE_PATH "$out/lib/node_modules" \
--add-flags "$out/bin/launcher.js"
runHook postInstall
runHook postInstall
'';
doCheck = false;

View File

@@ -1,9 +0,0 @@
{
pkgs,
...
}:
pkgs.callPackage ./package.nix {
librusty_v8 = pkgs.callPackage ./librusty_v8.nix {
inherit (pkgs.callPackage ./fetchers.nix { }) fetchLibrustyV8;
};
}

View File

@@ -1,21 +0,0 @@
# Fetchers for goose-cli pre-built dependencies
# Based on deno's approach for handling rusty_v8
{
lib,
stdenv,
fetchurl,
}:
{
fetchLibrustyV8 =
args:
fetchurl {
name = "librusty_v8-${args.version}";
url = "https://github.com/denoland/rusty_v8/releases/download/v${args.version}/librusty_v8_release_${stdenv.hostPlatform.rust.rustcTarget}.a.gz";
hash = args.shas.${stdenv.hostPlatform.system};
meta = {
inherit (args) version;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
};
}

View File

@@ -1,13 +0,0 @@
# Pre-built librusty_v8 library for goose-cli
# This file specifies the rusty_v8 version and hashes for all supported platforms
{ fetchLibrustyV8 }:
fetchLibrustyV8 {
version = "145.0.0";
shas = {
x86_64-linux = "sha256-chV1PAx40UH3Ute5k3lLrgfhih39Rm3KqE+mTna6ysE=";
aarch64-linux = "sha256-4IivYskhUSsMLZY97+g23UtUYh4p5jk7CzhMbMyqXyY=";
x86_64-darwin = "sha256-1jUuC+z7saQfPYILNyRJanD4+zOOhXU2ac/LFoytwho=";
aarch64-darwin = "sha256-yHa1eydVCrfYGgrZANbzgmmf25p7ui1VMas2A7BhG6k=";
};
}

View File

@@ -1,94 +0,0 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
pkg-config,
cmake,
cacert,
openssl,
libxcb,
dbus,
versionCheckHook,
librusty_v8,
llvmPackages,
}:
rustPlatform.buildRustPackage rec {
pname = "goose-cli";
version = "1.33.1";
src = fetchFromGitHub {
owner = "block";
repo = "goose";
rev = "v${version}";
hash = "sha256-FBICGOfVs2jbOdLWSInqfTYBdnCcbcGWHwqY/b6v8eg=";
};
cargoHash = "sha256-fN0FKDYFkZrQQPWdUlemOaGzIAZhqFyskz9TEmG+X4o=";
nativeBuildInputs = [
pkg-config
cmake
llvmPackages.libclang
];
buildInputs = [
openssl
libxcb
dbus
];
# The v8 package will try to download a `librusty_v8.a` release at build time to our read-only filesystem
# To avoid this we pre-download the file and export it via RUSTY_V8_ARCHIVE
env.RUSTY_V8_ARCHIVE = librusty_v8;
# bindgen (used by llama-cpp-sys-2) needs libclang and C headers
env.LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
env.BINDGEN_EXTRA_CLANG_ARGS = "-isystem ${lib.getDev stdenv.cc.libc}/include";
# reqwest needs CA certificates in the sandbox
env.SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
# Build only the CLI package
cargoBuildFlags = [
"--package"
"goose-cli"
];
# Enable tests with proper environment
doCheck = true;
checkPhase = ''
export HOME=$(mktemp -d)
export XDG_CONFIG_HOME=$HOME/.config
export XDG_DATA_HOME=$HOME/.local/share
export XDG_STATE_HOME=$HOME/.local/state
export XDG_CACHE_HOME=$HOME/.cache
mkdir -p $XDG_CONFIG_HOME $XDG_DATA_HOME $XDG_STATE_HOME $XDG_CACHE_HOME
# Run tests for goose-cli package only
cargo test --package goose-cli
'';
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
passthru = {
category = "AI Coding Agents";
updateScript = [
"nix-update"
"--flake"
".#goose-cli"
];
};
meta = {
description = "CLI for Goose - a local, extensible, open source AI agent that automates engineering tasks";
homepage = "https://github.com/block/goose";
changelog = "https://github.com/block/goose/releases/tag/v${version}";
license = lib.licenses.asl20;
sourceProvenance = with lib.sourceTypes; [ fromSource ];
mainProgram = "goose";
platforms = lib.platforms.all;
};
}

View File

@@ -1,26 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p python3 nix-update
"""
Update script for goose-cli package.
This script uses nix-update to fetch the latest version of goose-cli
and update the package.nix file with the new version, src hash, and cargoHash.
It also updates the librusty_v8 hashes via the custom fetchers.nix.
Usage:
./update.py # Update to latest release
./update.py --version 1.34.0 # Update to specific version
"""
import subprocess
import sys
def main():
args = ["nix-update", "--flake", ".#goose-cli"] + sys.argv[1:]
subprocess.check_call(args)
if __name__ == "__main__":
main()

View File

@@ -5,7 +5,7 @@
}:
python3Packages.buildPythonApplication rec {
pname = "graphifyy";
pname = "graphify";
version = "0.7.10";
pyproject = true;

View File

@@ -0,0 +1,5 @@
{
pkgs,
...
}:
pkgs.callPackage ./package.nix { }

View File

@@ -0,0 +1,88 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
fetchurl,
nodejs_22,
makeBinaryWrapper,
}:
let
version = "3.8.28";
npmTarball = fetchurl {
url = "https://registry.npmjs.org/omniroute/-/omniroute-${version}.tgz";
hash = "sha256-/le4p5DSX5T7/srNuxVBLepzUPw8BgIVio+h0JnbfyY=";
};
in
buildNpmPackage (finalAttrs: {
pname = "omniroute";
inherit version;
src = fetchFromGitHub {
owner = "diegosouzapw";
repo = "OmniRoute";
rev = "v${finalAttrs.version}";
hash = "sha256-BRvpbhhLTYj2rKw+nZloaXkpu3ySs5sWZo9425xvAPs=";
};
nodejs = nodejs_22;
npmDepsHash = "sha256-Q1KLR3NkeFBB+tQzBazy+XWyIfpG8Magv+rdeqISNxw=";
# Skip Next.js build (requires network for Google Fonts).
# Pre-built dist/ is copied from the npm tarball in preConfigure.
dontNpmBuild = true;
nativeBuildInputs = [
makeBinaryWrapper
];
npmInstallFlags = [ "--ignore-scripts" ];
npmRebuildFlags = [ "--ignore-scripts" ];
env = {
HOME = "$TMPDIR";
};
preConfigure = ''
mkdir -p _npm_tmp
tar xzf ${npmTarball} -C _npm_tmp
cp -r _npm_tmp/package/dist .
rm -rf _npm_tmp
'';
installPhase = ''
runHook preInstall
mkdir -p $out/lib/node_modules/omniroute
cp -r . $out/lib/node_modules/omniroute/
mkdir -p $out/bin
makeWrapper "${nodejs_22}/bin/node" "$out/bin/omniroute" \
--add-flags "$out/lib/node_modules/omniroute/bin/omniroute.mjs"
makeWrapper "${nodejs_22}/bin/node" "$out/bin/omniroute-reset-password" \
--add-flags "$out/lib/node_modules/omniroute/bin/reset-password.mjs"
runHook postInstall
'';
passthru = {
category = "AI LLM Gateway";
updateScript = [
"nix-update"
"--flake"
".#omniroute"
];
};
meta = {
description = "Unified AI router with 160+ providers, RTK+Caveman compression, auto fallback, MCP/A2A, OpenAI-compatible APIs";
homepage = "https://github.com/diegosouzapw/OmniRoute";
changelog = "https://github.com/diegosouzapw/OmniRoute/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
mainProgram = "omniroute";
platforms = lib.platforms.all;
};
})

View File

@@ -25,6 +25,9 @@ let
postPatch = ''
# Fix missing resolved URLs for packages under web/node_modules/
# WARNING: This sed is version-specific if upstream bumps a
# transitive dep version, the patterns silently fail and the
# build breaks. Update resolved/integrity values when bumping radar.
# that are actually external npm packages (not workspace links).
# Insert "resolved" and "integrity" after the "version" field
# for each affected package using sed.

View File

@@ -0,0 +1,5 @@
{
pkgs,
...
}:
pkgs.callPackage ./package.nix { }

View File

@@ -0,0 +1,107 @@
{
lib,
python3Packages,
fetchFromGitHub,
fetchurl,
makeWrapper,
}:
let
cerebras-cloud-sdk = python3Packages.buildPythonPackage rec {
pname = "cerebras-cloud-sdk";
version = "1.67.0";
pyproject = true;
src = fetchurl {
url = "https://files.pythonhosted.org/packages/92/12/c201f07582068141e88f9a523ab02fdc97de58f2f7c0df775c6c52b9d8dd/cerebras_cloud_sdk-1.67.0.tar.gz";
hash = "sha256-Ou1vhsbHqD7p1M+wiirOoInOvyr1uK7RFu95mVpPSBM=";
};
build-system = with python3Packages; [
hatchling
hatch-fancy-pypi-readme
];
postPatch = ''
sed -i 's/hatchling==[0-9.]*/hatchling/' pyproject.toml
'';
dependencies = with python3Packages; [
anyio
distro
httpx
pydantic
sniffio
typing-extensions
];
doCheck = false;
meta = {
description = "Python SDK for Cerebras AI platform";
homepage = "https://github.com/CerebrasAI/cerebras-cloud-sdk-python";
license = lib.licenses.asl20;
};
};
pyDeps = with python3Packages; [
fastapi
uvicorn
google-genai
cerebras-cloud-sdk
groq
mistralai
requests
python-dotenv
pydantic
httpx
];
in
python3Packages.buildPythonApplication {
pname = "relay-free-llm";
version = "0.1.0+unstable";
format = "other";
src = fetchFromGitHub {
owner = "msmarkgu";
repo = "RelayFreeLLM";
rev = "fea9e1642dbbc5c0980885f41b21aa04a30090a2";
hash = "sha256-ZLAVhJFrVFjqAz0f4qOi2REBDccIc8g2H9b7dcqcYRU=";
};
nativeBuildInputs = [ makeWrapper ];
propagatedBuildInputs = pyDeps;
installPhase = ''
runHook preInstall
mkdir -p $out/lib/relay-free-llm
cp -r src $out/lib/relay-free-llm/
runHook postInstall
'';
postInstall = ''
makeWrapper ${python3Packages.python.interpreter} $out/bin/relay-free-llm \
--add-flags "-m src.server" \
--prefix PYTHONPATH : "$out/lib/relay-free-llm:$PYTHONPATH"
'';
doCheck = false;
passthru = {
category = "AI LLM Gateway";
updateScript = [
"nix-update"
"--flake"
".#relay-free-llm"
"--version=branch=main"
];
};
meta = {
description = "RESTful API to route user prompts to various AI model providers";
homepage = "https://github.com/msmarkgu/RelayFreeLLM";
license = lib.licenses.mit;
mainProgram = "relay-free-llm";
platforms = lib.platforms.all;
};
}