From 78f0bc8e0f7268dfec6c299d6e2e167fe340b8a7 Mon Sep 17 00:00:00 2001 From: Thierry Delafontaine Date: Fri, 2 Jan 2026 21:34:33 +0100 Subject: [PATCH 1/2] opencode: install shell completions (bash only) Related to https://github.com/sst/opencode/pull/6239 --- pkgs/by-name/op/opencode/package.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/by-name/op/opencode/package.nix b/pkgs/by-name/op/opencode/package.nix index 1d6076a7b127..801626c102b4 100644 --- a/pkgs/by-name/op/opencode/package.nix +++ b/pkgs/by-name/op/opencode/package.nix @@ -9,6 +9,7 @@ nix-update-script, ripgrep, testers, + installShellFiles, writableTmpDirAsHomeHook, }: let @@ -85,8 +86,10 @@ stdenvNoCC.mkDerivation (finalAttrs: { nativeBuildInputs = [ bun + installShellFiles makeBinaryWrapper models-dev + writableTmpDirAsHomeHook ]; patches = [ @@ -197,6 +200,11 @@ stdenvNoCC.mkDerivation (finalAttrs: { $out/lib/opencode/node_modules/@opentui/$pkgName fi done + + ${lib.optionalString (stdenvNoCC.hostPlatform.system != "x86_64-darwin") '' + installShellCompletion --cmd opencode \ + --bash <($out/bin/opencode completion) + ''} ''; passthru = { From 0770c47dab4b1c4c5924fca7b1cfe7f7b15fd8f3 Mon Sep 17 00:00:00 2001 From: Thierry Delafontaine Date: Sun, 4 Jan 2026 19:33:48 +0000 Subject: [PATCH 2/2] opencode: 1.0.224 -> 1.1.3 --- pkgs/by-name/op/opencode/package.nix | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/op/opencode/package.nix b/pkgs/by-name/op/opencode/package.nix index 801626c102b4..7d91031028ed 100644 --- a/pkgs/by-name/op/opencode/package.nix +++ b/pkgs/by-name/op/opencode/package.nix @@ -14,12 +14,12 @@ }: let pname = "opencode"; - version = "1.0.224"; + version = "1.1.3"; src = fetchFromGitHub { - owner = "sst"; + owner = "anomalyco"; repo = "opencode"; tag = "v${version}"; - hash = "sha256-4ozluoXTovh1wpWVzxCN4jUO7cMxZER/0KMOBsJFO64="; + hash = "sha256-uNeje6WZ/FJVOtxdTdWXbWhPl7BwMws+7/Iz2Hz/stw="; }; node_modules = stdenvNoCC.mkDerivation { @@ -71,7 +71,7 @@ let # NOTE: Required else we get errors that our fixed-output derivation references store paths dontFixup = true; - outputHash = "sha256-+HEd3I11VqejTi7cikbTL5+DmNGyvUC4Cm4ysfujwes="; + outputHash = "sha256-LJ7xgKQP0ows76P8QVflS6SGGowVBYVvarkmCVkfe60="; outputHashAlgo = "sha256"; outputHashMode = "recursive"; }; @@ -201,10 +201,16 @@ stdenvNoCC.mkDerivation (finalAttrs: { fi done - ${lib.optionalString (stdenvNoCC.hostPlatform.system != "x86_64-darwin") '' - installShellCompletion --cmd opencode \ - --bash <($out/bin/opencode completion) - ''} + ${lib.optionalString + ( + (stdenvNoCC.buildPlatform.canExecute stdenvNoCC.hostPlatform) + && (stdenvNoCC.hostPlatform.system != "x86_64-darwin") + ) + '' + installShellCompletion --cmd opencode \ + --bash <($out/bin/opencode completion) + '' + } ''; passthru = { @@ -229,7 +235,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { It combines a TypeScript/JavaScript core with a Go-based TUI to provide an interactive AI coding experience. ''; - homepage = "https://github.com/sst/opencode"; + homepage = "https://github.com/anomalyco/opencode"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ delafthi ]; sourceProvenance = with lib.sourceTypes; [ fromSource ];