Files
nixpkgs/pkgs/sidecar/default.nix

69 lines
1.5 KiB
Nix
Raw Normal View History

{
lib,
buildGoModule,
fetchFromGitHub,
gitMinimal,
makeWrapper, # Add this
nix-update-script,
2026-02-11 19:58:52 +01:00
opencode,
2026-02-11 18:03:31 +01:00
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 \
2026-02-11 19:58:52 +01:00
--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;
};
})