{ lib, stdenv, stdenvNoCC, autoPatchelfHook, alsa-lib, testers, vscode-utils, }: vscode-utils.buildVscodeMarketplaceExtension (finalAttrs: { nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ (lib.getLib stdenv.cc.cc) alsa-lib ]; mktplcRef = let sources = { "x86_64-linux" = { arch = "linux-x64"; hash = "sha256-8SakE2rooV1s7+vDSNFKGErsnGEpxFMuds2Zit1b9cw="; }; "aarch64-linux" = { arch = "linux-arm64"; hash = "sha256-gGli7mBulBHvEzUMY8IpAAyFYoVCT/oCE7pzLONf1Yg="; }; "aarch64-darwin" = { arch = "darwin-arm64"; hash = "sha256-4exme1H0ax6kGs06ob2FdHowsMxCSMldn+niKeQHcIU="; }; }; in { name = "claude-code"; publisher = "anthropic"; version = "2.1.234"; } // sources.${stdenvNoCC.hostPlatform.system} or (throw "Unsupported system ${stdenvNoCC.hostPlatform.system}"); passthru.tests.bundled-claude-runs = testers.testVersion { package = finalAttrs.finalPackage; command = "${finalAttrs.finalPackage}/share/vscode/extensions/anthropic.claude-code/resources/native-binary/claude --version"; }; meta = { description = "Harness the power of Claude Code without leaving your IDE"; homepage = "https://docs.anthropic.com/s/claude-code"; downloadPage = "https://marketplace.visualstudio.com/items?itemName=anthropic.claude-code"; license = lib.licenses.unfree; sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; maintainers = with lib.maintainers; [ xiaoxiangmoe ]; platforms = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" ]; }; })