{ lib, flake, fetchFromGitHub, rustPlatform, versionCheckHook, versionCheckHomeHook, }: rustPlatform.buildRustPackage rec { pname = "cc-switch-cli"; version = "5.10.4"; src = fetchFromGitHub { owner = "SaladDay"; repo = "cc-switch-cli"; tag = "v${version}"; hash = "sha256-lRsfrqkPhyJ0zg8RdiGAWBSjMIsOHZekdUXWfcNlqOQ="; }; cargoRoot = "src-tauri"; buildAndTestSubdir = "src-tauri"; cargoHash = "sha256-lNktgXA1lfMuyJ4sEaK6HAaAlkOwqhtmCLUYvBW7siE="; # Tests require network access and runtime configuration doCheck = false; doInstallCheck = true; nativeInstallCheckInputs = [ versionCheckHook versionCheckHomeHook ]; passthru.category = "Claude Code Ecosystem"; meta = with lib; { description = "CLI version of CC Switch - All-in-One Assistant for Claude Code, Codex & Gemini CLI"; homepage = "https://github.com/SaladDay/cc-switch-cli"; changelog = "https://github.com/SaladDay/cc-switch-cli/releases/tag/v${version}"; downloadPage = "https://github.com/SaladDay/cc-switch-cli/releases"; license = licenses.mit; sourceProvenance = with sourceTypes; [ fromSource ]; maintainers = with flake.lib.maintainers; [ zrubing ]; mainProgram = "cc-switch"; platforms = platforms.unix; }; }