mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
opencode: 0.0.46 -> 0.0.52, switch to sst fork
(cherry picked from commit f917ffcbdf)
This commit is contained in:
committed by
Thierry Delafontaine
parent
718e1e6c7e
commit
fdf8d97874
@@ -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; [
|
||||
|
||||
Reference in New Issue
Block a user