b6becd5e01
CI / check (push) Has been cancelled
- packages/open-code-review/opencode-plugin.nix: builds the plugin TS file
plus runtime node_modules from the plugin's package-lock.json into
share/open-code-review/opencode (exposed as passthru.opencode-plugin,
same source rev as the CLI so versions stay locked)
- modules/open-code-review-hm.nix: homeManagerModules.default with
programs.open-code-review.{enable,opencode.enable} — symlinks the plugin
and node_modules into ~/.config/opencode/plugins/ and installs the CLI
- flake.nix: expose homeManagerModules.default
Note: upstream declares the plugin SDKs as devDependencies, so the
lockfile install must not use --omit=dev.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
58 lines
1.3 KiB
Nix
58 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
callPackage,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "open-code-review";
|
|
version = "1.12.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "alibaba";
|
|
repo = "open-code-review";
|
|
rev = "v${version}";
|
|
hash = "sha256-g/l4Ezv1YJYjRNI2DU5WgkaPvYp+/SC3yL+HEl/8kFI=";
|
|
};
|
|
|
|
vendorHash = "sha256-f5Ty22wicf1J8+RKnHYcEO7flWn9gkWQODlfunn23EA=";
|
|
|
|
env.CGO_ENABLED = 0;
|
|
|
|
subPackages = [ "cmd/opencodereview" ];
|
|
|
|
doCheck = false;
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X main.Version=v${version}"
|
|
"-X main.GitCommit=v${version}"
|
|
"-X main.BuildDate=1970-01-01T00:00:00Z"
|
|
];
|
|
|
|
passthru = {
|
|
category = "Code Review";
|
|
# OpenCode plugin built from the same source revision as the CLI.
|
|
opencode-plugin = callPackage ./opencode-plugin.nix {
|
|
inherit src version;
|
|
};
|
|
updateScript = [
|
|
"nix-update"
|
|
"--flake"
|
|
".#open-code-review"
|
|
];
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "AI-powered code review CLI combining deterministic pipelines with an LLM agent";
|
|
homepage = "https://github.com/alibaba/open-code-review";
|
|
changelog = "https://github.com/alibaba/open-code-review/releases/tag/v${version}";
|
|
license = licenses.asl20;
|
|
sourceProvenance = with sourceTypes; [ fromSource ];
|
|
mainProgram = "opencodereview";
|
|
platforms = platforms.all;
|
|
};
|
|
}
|