summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/co/codex-relay/package.nix
blob: efe09322e6df7d06ca19df2c35410c5f9f362828 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{
  lib,
  fetchFromGitHub,
  rustPlatform,
  versionCheckHook,
  nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
  pname = "codex-relay";
  version = "0.5.8";
  __structuredAttrs = true;

  src = fetchFromGitHub {
    owner = "MetaFARS";
    repo = "codex-relay";
    tag = "v${finalAttrs.version}";
    hash = "sha256-cdBzuurqJGT4EzgZbq4deXZKiJoOjCg+S1efnpk0/wU=";
  };

  cargoHash = "sha256-ak4yEKEf94NPvOlcoT97/X53sKu6+euwfWfbs52Tef0=";

  nativeInstallCheckInputs = [ versionCheckHook ];
  doInstallCheck = true;

  passthru.updateScript = nix-update-script { };

  meta = with lib; {
    description = "Responses API ↔  Chat Completions translation bridge for Codex CLI";
    longDescription = ''
      A lightweight Rust proxy that translates the OpenAI Responses API
      (used by Codex CLI) into the Chat Completions API, letting Codex work
      with any OpenAI-compatible provider —  DeepSeek, Kimi, Qwen, Mistral,
      Groq, xAI, OpenRouter, and more.
    '';
    homepage = "https://github.com/MetaFARS/codex-relay";
    changelog = "https://github.com/MetaFARS/codex-relay/releases/tag/v${finalAttrs.version}";
    license = licenses.mit;
    mainProgram = "codex-relay";
    maintainers = [ maintainers.andrewzah ];
  };
})