diff --git a/overlays/custom-packages.nix b/overlays/custom-packages.nix index 9e7515bc..311bf83b 100644 --- a/overlays/custom-packages.nix +++ b/overlays/custom-packages.nix @@ -1,6 +1,9 @@ # Custom package definitions # These are packages not available in nixpkgs or requiring customization self: super: { + # Agentsview session viewer + agentsview = super.callPackage ./../packages/agentsview/package.nix {}; + # Claude desktop app claude-desktop = super.callPackage ./../packages/claude-desktop/package.nix {}; diff --git a/packages/agentsview/package.nix b/packages/agentsview/package.nix new file mode 100644 index 00000000..05287a11 --- /dev/null +++ b/packages/agentsview/package.nix @@ -0,0 +1,41 @@ +{ + lib, + stdenv, + fetchzip, + autoPatchelfHook, +}: let + version = "0.15.0"; + + sources = { + x86_64-linux = { + url = "https://github.com/wesm/agentsview/releases/download/v${version}/agentsview_${version}_linux_amd64.tar.gz"; + hash = "sha256-Phrza30+s8ag9AZtWD0jvQ3Q5iwaOgnKr7aYS7AIKGA="; + }; + aarch64-darwin = { + url = "https://github.com/wesm/agentsview/releases/download/v${version}/agentsview_${version}_darwin_arm64.tar.gz"; + hash = "sha256-YQ15t98gktHEw/OfaOja7/DzTXkgBxxwre+dLLV0pw0="; + }; + }; + + src = fetchzip (sources.${stdenv.hostPlatform.system} or (throw "unsupported system: ${stdenv.hostPlatform.system}")); +in + stdenv.mkDerivation { + pname = "agentsview"; + inherit version src; + + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [autoPatchelfHook]; + + installPhase = '' + runHook preInstall + install -Dm755 agentsview $out/bin/agentsview + runHook postInstall + ''; + + meta = with lib; { + description = "Local-first viewer for AI agent coding sessions"; + homepage = "https://github.com/wesm/agentsview"; + license = licenses.mit; + mainProgram = "agentsview"; + platforms = builtins.attrNames sources; + }; + }