From 6789422ac6cd9f031ad3ea6d8de2256ce7b93c45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Fri, 25 Sep 2026 15:00:07 +0200 Subject: [PATCH] agentaps: init at 0.3.1 Package the v0.3.1 release and include the upstream --version flag so the installed binary can be checked with versionCheckHook. Release notes: https://github.com/domenkozar/agentaps/blob/v0.3.1/CHANGELOG.md Assisted-by: Codex (GPT-6) --- pkgs/by-name/ag/agentaps/package.nix | 89 ++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 pkgs/by-name/ag/agentaps/package.nix diff --git a/pkgs/by-name/ag/agentaps/package.nix b/pkgs/by-name/ag/agentaps/package.nix new file mode 100644 index 000000000000..e7f88d07a8c3 --- /dev/null +++ b/pkgs/by-name/ag/agentaps/package.nix @@ -0,0 +1,89 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + fetchpatch, + git, + pkg-config, + makeWrapper, + versionCheckHook, + fontconfig, + freetype, + libGL, + libxcb, + libxkbcommon, + vulkan-loader, + wayland, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "agentaps"; + version = "0.3.1"; + + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "domenkozar"; + repo = "agentaps"; + tag = "v${finalAttrs.version}"; + hash = "sha256-pHESE5ML5zeDylz07t8k1jJop/IGyIhTTffPN4dWrY0="; + }; + + cargoHash = "sha256-ko+ytnpQGLIA41+aurIcY5Rp0Aemf7Z4PFC5GdLFLvw="; + + patches = [ + # Add --version support until the next release. + (fetchpatch { + url = "https://github.com/domenkozar/agentaps/commit/1665c2792929226d675d427e0eef42cd3ede7a71.patch"; + hash = "sha256-+wL5G6Ln9uuWxt2fRW2QPbD54Zif51hGxcNAC3Q3f84="; + includes = [ "src/main.rs" ]; + }) + ]; + + nativeBuildInputs = [ + makeWrapper + pkg-config + ]; + + buildInputs = [ + fontconfig + freetype + libGL + libxcb + libxkbcommon + vulkan-loader + wayland + ]; + + nativeCheckInputs = [ git ]; + + # The login shell test requires /bin/sh and /usr/bin/env, which are absent in the sandbox. + checkFlags = [ "--skip=shell_env::tests::reads_path_from_a_login_shell" ]; + + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgramArg = "--version"; + doInstallCheck = true; + + postFixup = '' + wrapProgram "$out/bin/agentaps" \ + --suffix LD_LIBRARY_PATH : "${ + lib.makeLibraryPath [ + libGL + libxcb + libxkbcommon + vulkan-loader + wayland + ] + }" + ''; + + meta = { + description = "Desktop client for Agent Client Protocol agents"; + homepage = "https://github.com/domenkozar/agentaps"; + changelog = "https://github.com/domenkozar/agentaps/blob/v${finalAttrs.version}/CHANGELOG.md"; + license = lib.licenses.asl20; + mainProgram = "agentaps"; + maintainers = with lib.maintainers; [ domenkozar ]; + platforms = lib.platforms.linux; + }; +})