mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
67 lines
1.9 KiB
Nix
67 lines
1.9 KiB
Nix
{
|
|
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-/uvQIg773WUzalc9XFtBrocsGye3v5y1rvKyJVpXWS0=";
|
|
};
|
|
"aarch64-linux" = {
|
|
arch = "linux-arm64";
|
|
hash = "sha256-zC0iYoAxmymxdqo2JgDcMOvUOA3pFbkx0s9C4F6E75k=";
|
|
};
|
|
"x86_64-darwin" = {
|
|
arch = "darwin-x64";
|
|
hash = "sha256-mhZBWpV3Gl5TLieIEvrtDmtqQBKeiCcDCwOShQnp++Y=";
|
|
};
|
|
"aarch64-darwin" = {
|
|
arch = "darwin-arm64";
|
|
hash = "sha256-I570YO5mvXgzXG52NdoGjgVgHbyshm6fIkCIN0li9+4=";
|
|
};
|
|
};
|
|
in
|
|
{
|
|
name = "claude-code";
|
|
publisher = "anthropic";
|
|
version = "2.1.201";
|
|
}
|
|
// 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"
|
|
"x86_64-darwin"
|
|
"aarch64-darwin"
|
|
];
|
|
};
|
|
})
|