opencode: 0.0.46 -> 0.0.52, switch to sst fork

(cherry picked from commit f917ffcbdf)
This commit is contained in:
Gaetan Lepage
2025-06-10 14:01:01 +02:00
committed by Thierry Delafontaine
parent 718e1e6c7e
commit fdf8d97874

View File

@@ -2,20 +2,28 @@
lib,
fetchFromGitHub,
buildGoModule,
versionCheckHook,
nix-update-script,
}:
buildGoModule (finalAttrs: {
pname = "opencode";
version = "0.0.46";
version = "0.0.52";
src = fetchFromGitHub {
owner = "opencode-ai";
owner = "sst";
repo = "opencode";
tag = "v${finalAttrs.version}";
hash = "sha256-Q7ArUsFMpe0zayUMBJd+fC1K4jTGElIFep31Qa/L1jY=";
hash = "sha256-wniGu8EXOI2/sCI7gv2luQgODRdes7tt1CoJ6Gs09ig=";
};
vendorHash = "sha256-MVpluFTF/2S6tRQQAXE3ujskQZ3njBkfve0RQgk3IkQ=";
vendorHash = "sha256-pnev0o2/jirTqG67amCeI49XUdMCCulpGq/jYqGqzRY=";
ldflags = [
"-s"
"-w"
"-X github.com/sst/opencode/internal/version.Version=${finalAttrs.version}"
];
checkFlags =
let
@@ -24,13 +32,25 @@ buildGoModule (finalAttrs: {
"TestBashTool_Run"
"TestSourcegraphTool_Run"
"TestLsTool_Run"
# Difference with snapshot
"TestGetContextFromPaths"
];
in
[ "-skip=^${lib.concatStringsSep "$|^" skippedTests}$" ];
nativeCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Powerful terminal-based AI assistant providing intelligent coding assistance";
homepage = "https://github.com/opencode-ai/opencode";
changelog = "https://github.com/sst/opencode/releases/tag/v${finalAttrs.version}";
mainProgram = "opencode";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [