{ lib, fetchFromGitHub, flake, rustPlatform, versionCheckHook, versionCheckHomeHook, }: rustPlatform.buildRustPackage (finalAttrs: { pname = "ctx"; version = "1.3.1"; src = fetchFromGitHub { owner = "ctxrs"; repo = "ctx"; tag = "v${finalAttrs.version}"; hash = "sha256-BqQBbI0/WNA7g4OFs6Z+DvwfHZdxD/Yod260pxS+fnc="; }; cargoHash = "sha256-BJBl7eyYdTzlTpdbcFXMaztTVCcWw2q1JJF1GYxxFRY="; cargoBuildFlags = [ "--package" "ctx" ]; # CoreML acquisition tests fail in Nix sandbox. doCheck = false; doInstallCheck = true; nativeInstallCheckInputs = [ versionCheckHook versionCheckHomeHook ]; passthru.category = "Utilities"; meta = { description = "Search the coding agent history already on your machine"; homepage = "https://github.com/ctxrs/ctx"; changelog = "https://github.com/ctxrs/ctx/releases/tag/v${finalAttrs.version}"; license = lib.licenses.asl20; sourceProvenance = with lib.sourceTypes; [ fromSource ]; maintainers = with flake.lib.maintainers; [ mulatta ]; mainProgram = "ctx"; platforms = lib.platforms.unix; }; })