vscode-extensions.anthropic.claude-code: use platform-specific VSIXs (#513902)

This commit is contained in:
Pol Dellaiera
2026-04-27 21:38:02 +00:00
committed by GitHub
@@ -1,22 +1,38 @@
{
lib,
claude-code,
stdenvNoCC,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "claude-code";
publisher = "anthropic";
version = "2.1.119";
hash = "sha256-/KqOJ8dvv6PhQJyfuOFEgKx6U8hH/WoUnocmWxsLLUk=";
};
postInstall = ''
mkdir -p "$out/$installPrefix/resources/native-binary"
rm -f "$out/$installPrefix/resources/native-binary/claude"*
ln -s "${claude-code}/bin/claude" "$out/$installPrefix/resources/native-binary/claude"
'';
mktplcRef =
let
sources = {
"x86_64-linux" = {
arch = "linux-x64";
hash = "sha256-w4kUYNnQW4KkIlzxnTASTBFxL3m3/NBwBET7/8ealIY=";
};
"aarch64-linux" = {
arch = "linux-arm64";
hash = "sha256-ZsVR7Qajv78A0+UfR+DqaUZyV1FFRjNs2+vJInboh6U=";
};
"x86_64-darwin" = {
arch = "darwin-x64";
hash = "sha256-8zvhF5cs1XOGa/l2M27K2Mv2cgusNy51glFZf1OVdWI=";
};
"aarch64-darwin" = {
arch = "darwin-arm64";
hash = "sha256-Csb9F6HGWAgvPDjtsu35gjtGCuDLu0WQD1NNX/+S7F8=";
};
};
in
{
name = "claude-code";
publisher = "anthropic";
version = "2.1.119";
}
// sources.${stdenvNoCC.hostPlatform.system}
or (throw "Unsupported system ${stdenvNoCC.hostPlatform.system}");
meta = {
description = "Harness the power of Claude Code without leaving your IDE";
@@ -25,5 +41,11 @@ vscode-utils.buildVscodeMarketplaceExtension {
license = lib.licenses.unfree;
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
maintainers = with lib.maintainers; [ xiaoxiangmoe ];
platforms = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
};
}