{ lib, flake, rustPlatform, fetchFromGitHub, cmake, pkg-config, versionCheckHook, versionCheckHomeHook, }: rustPlatform.buildRustPackage (finalAttrs: { pname = "lean-ctx"; version = "3.10.1"; src = fetchFromGitHub { owner = "yvgude"; repo = "lean-ctx"; tag = "v${finalAttrs.version}"; hash = "sha256-qdWpPsSupKnyG/6joHCFGe+snWwRMS8ZuN4de7a2vtU="; }; cargoRoot = "rust"; buildAndTestSubdir = "rust"; cargoHash = "sha256-pDKE8Dfl75Zau67DbQ5gXelF6yxrI3NzTv+Y5mTWkEQ="; nativeBuildInputs = [ cmake pkg-config ]; doCheck = false; doInstallCheck = true; nativeInstallCheckInputs = [ versionCheckHook versionCheckHomeHook ]; passthru.category = "Memory & Code Intelligence"; meta = { description = "Context OS for AI development — compression, memory, and routing for LLM context"; homepage = "https://github.com/yvgude/lean-ctx"; changelog = "https://github.com/yvgude/lean-ctx/releases/tag/v${finalAttrs.version}"; license = lib.licenses.asl20; sourceProvenance = with lib.sourceTypes; [ fromSource ]; maintainers = with flake.lib.maintainers; [ csanthiago ]; mainProgram = "lean-ctx"; platforms = lib.platforms.unix; }; })