Diff: https://github.com/marcus/sidecar/compare/v0.74.1...v0.76.0 Changelog: https://github.com/marcus/sidecar/releases/tag/v0.76.0
69 lines
1.5 KiB
Nix
69 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
gitMinimal,
|
|
makeWrapper, # Add this
|
|
nix-update-script,
|
|
opencode,
|
|
td,
|
|
tmux,
|
|
versionCheckHook,
|
|
writableTmpDirAsHomeHook,
|
|
}:
|
|
buildGoModule (finalAttrs: {
|
|
pname = "sidecar";
|
|
version = "0.76.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "marcus";
|
|
repo = "sidecar";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-MJ2fXxYjCJzO8XoRAuvVC2CZMIUeFH3PKim8lsc4AD0=";
|
|
};
|
|
|
|
vendorHash = "sha256-PnA7vbDBIANmHTl6VfP8eTGewjT/A5CuEd+bfP6VQOA=";
|
|
|
|
subPackages = ["cmd/sidecar"];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X main.Version=v${finalAttrs.version}" # Can combine these
|
|
];
|
|
|
|
nativeBuildInputs = [makeWrapper]; # Add this
|
|
|
|
nativeCheckInputs = [
|
|
gitMinimal
|
|
writableTmpDirAsHomeHook
|
|
];
|
|
|
|
nativeInstallCheckInputs = [
|
|
versionCheckHook
|
|
writableTmpDirAsHomeHook
|
|
];
|
|
|
|
versionCheckProgramArg = "--version";
|
|
doInstallCheck = true;
|
|
doCheck = false;
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/sidecar \
|
|
--prefix PATH : ${lib.makeBinPath [opencode td tmux]}
|
|
'';
|
|
|
|
passthru = {
|
|
updateScript = nix-update-script {};
|
|
};
|
|
|
|
meta = {
|
|
description = "Use sidecar next to CLI agents for diffs, file trees, conversation history, and task management with td";
|
|
homepage = "https://github.com/marcus/sidecar";
|
|
changelog = "https://github.com/marcus/sidecar/releases/tag/v${finalAttrs.version}";
|
|
license = lib.licenses.mit;
|
|
mainProgram = "sidecar";
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
})
|