feat(codex-oauth-proxy): add 1.1.1 Codex OAuth proxy package
Packages dvcrn/codex-oauth-proxy, which exposes a ChatGPT Codex account through OpenAI-compatible APIs, as a buildGoModule derivation. Builds only cmd/codex-oauth-proxy because the worker package is js/wasm code, and passes -buildvcs=false because the Nix source has no .git. Upstream Go tests run offline, so doCheck is enabled.
This commit is contained in:
@@ -18,6 +18,7 @@ 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 |
|
||||
| `codeaf` | Coding harness and software factory for open models: hand work off, then watch every project from one terminal | AI Coding Agents |
|
||||
| `codex-api-proxy` | Local OpenAI-compatible HTTP proxy backed by Codex/OpenAI credentials | AI LLM Gateway |
|
||||
| `codex-oauth-proxy` | Local proxy exposing a ChatGPT Codex account through OpenAI-compatible APIs | AI LLM Gateway |
|
||||
| `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 |
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
pkgs.callPackage ./package.nix { }
|
||||
@@ -0,0 +1,73 @@
|
||||
{
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "codex-oauth-proxy";
|
||||
version = "1.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dvcrn";
|
||||
repo = "codex-oauth-proxy";
|
||||
# Upstream tags are bare semver, without the "v" prefix.
|
||||
rev = version;
|
||||
hash = "sha256-WZN+OVvK5/R46Ko01jw4m9jI9BcvpZzxWifcui90/g4=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-hb0rGd+HZHSV/sLXiIa7LPkXVuRqdXrQHZxM4v5sgvs=";
|
||||
|
||||
env.CGO_ENABLED = 0;
|
||||
|
||||
# cmd/codex-oauth-proxy-worker and parts of internal/server are js && wasm
|
||||
# Cloudflare Worker code needing syscall/js, so only the server is buildable.
|
||||
subPackages = [ "cmd/codex-oauth-proxy" ];
|
||||
|
||||
# The Nix source tree has no .git, so Go's VCS stamping fails without it.
|
||||
# Set before the build and check phases, which both call `go`.
|
||||
preConfigure = ''
|
||||
export GOFLAGS="$GOFLAGS -buildvcs=false"
|
||||
'';
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
];
|
||||
|
||||
# Upstream CI runs `go test -v ./...` and the suite only uses httptest and
|
||||
# t.Setenv, so it needs neither network nor credentials. The default check
|
||||
# phase would reuse subPackages and test only the server, hence the override.
|
||||
doCheck = true;
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
# Tests may read assets relative to their package directory.
|
||||
export GOFLAGS=''${GOFLAGS//-trimpath/}
|
||||
|
||||
go test -v ./...
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
category = "AI LLM Gateway";
|
||||
updateScript = [
|
||||
"nix-update"
|
||||
"--flake"
|
||||
".#codex-oauth-proxy"
|
||||
];
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Local proxy exposing a ChatGPT Codex account through OpenAI-compatible APIs";
|
||||
homepage = "https://github.com/dvcrn/codex-oauth-proxy";
|
||||
changelog = "https://github.com/dvcrn/codex-oauth-proxy/releases/tag/${version}";
|
||||
license = lib.licenses.mit;
|
||||
sourceProvenance = with lib.sourceTypes; [ fromSource ];
|
||||
mainProgram = "codex-oauth-proxy";
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user