From 6f9737986931c9f60534577783e5c2d720355d1f Mon Sep 17 00:00:00 2001 From: Thierry Delafontaine Date: Sat, 4 Apr 2026 19:48:23 +0200 Subject: [PATCH] opencode: generate and passthru schema for `config.json` and `tui.json` Since https://github.com/anomalyco/opencode/releases/tag/v1.2.15 TUI configuration is in a separate file (`tui.json`) with a separate schema. --- pkgs/by-name/op/opencode/package.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/op/opencode/package.nix b/pkgs/by-name/op/opencode/package.nix index 601bf5c6897b..40fb53890f5d 100644 --- a/pkgs/by-name/op/opencode/package.nix +++ b/pkgs/by-name/op/opencode/package.nix @@ -112,7 +112,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { cd ./packages/opencode bun --bun ./script/build.ts --single --skip-install - bun --bun ./script/schema.ts schema.json + bun --bun ./script/schema.ts config.json tui.json runHook postBuild ''; @@ -133,7 +133,8 @@ stdenvNoCC.mkDerivation (finalAttrs: { ) } - install -Dm644 schema.json $out/share/opencode/schema.json + install -Dm644 config.json $out/share/opencode/config.json + install -Dm644 tui.json $out/share/opencode/tui.json runHook postInstall ''; @@ -153,7 +154,10 @@ stdenvNoCC.mkDerivation (finalAttrs: { versionCheckProgramArg = "--version"; passthru = { - jsonschema = "${placeholder "out"}/share/opencode/schema.json"; + jsonschema = { + config = "${placeholder "out"}/share/opencode/config.json"; + tui = "${placeholder "out"}/share/opencode/tui.json"; + }; updateScript = nix-update-script { extraArgs = [ "--subpackage"