From 1d5f26488457578e452143de049e20d44d9250cc Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Thu, 14 May 2026 00:58:55 +0100 Subject: [PATCH] icm: init at 0.10.49 --- pkgs/by-name/ic/icm/package.nix | 68 +++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 pkgs/by-name/ic/icm/package.nix diff --git a/pkgs/by-name/ic/icm/package.nix b/pkgs/by-name/ic/icm/package.nix new file mode 100644 index 000000000000..65a8df3cb152 --- /dev/null +++ b/pkgs/by-name/ic/icm/package.nix @@ -0,0 +1,68 @@ +{ + lib, + stdenv, + rustPlatform, + fetchFromGitHub, + pkg-config, + openssl, + nix-update-script, + onnxruntime, + versionCheckHook, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "icm"; + version = "0.10.49"; + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "rtk-ai"; + repo = "icm"; + tag = "icm-v${finalAttrs.version}"; + hash = "sha256-GB2SH/Y2l4AkxoFqJfWcsGmWK4uOayCs1FSxBuXShwc="; + }; + + cargoHash = "sha256-U0mHWzRI6BDVC4LRpwWz/QbCeT0fEPxKoY5+1DrI048="; + + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = [ + openssl + onnxruntime + ]; + + # Build the HTTP dashboard + buildFeatures = [ "web" ]; + + env = { + # Use system OpenSSL instead of vendoring it + OPENSSL_NO_VENDOR = "1"; + # Point ort (ONNX Runtime bindings) at the system library + ORT_STRATEGY = "system"; + ORT_LIB_LOCATION = "${lib.getLib onnxruntime}/lib"; + }; + + nativeInstallCheckInputs = [ + versionCheckHook + ]; + doInstallCheck = true; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "^icm-(.*)" + ]; + }; + + meta = { + description = "Permanent memory system for AI agents with MCP integration"; + homepage = "https://github.com/rtk-ai/icm"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ jpds ]; + mainProgram = "icm"; + platforms = lib.platforms.unix; + broken = stdenv.hostPlatform.isDarwin; + }; +})