File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
pkgs/applications/editors/vscode/extensions/ms-vscode.cpptools Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 3939let
4040 gdbDefaultsTo = if gdbUseFixed then "${ gdb } /bin/gdb" else "gdb" ;
4141 isx86Linux = stdenv . hostPlatform . system == "x86_64-linux" ;
42+ isDarwin = stdenv . hostPlatform . isDarwin ;
4243 supported = {
4344 x86_64-linux = {
4445 hash = "sha256-KWr+nfODCRoZq67qwswzbcPW5WMmf9kvRwNFKpjyt4k=" ;
4849 hash = "sha256-a6PwlSo3q1hLVx0JDSTwPGfjfk7CtdYCuFccSpPg7U8=" ;
4950 arch = "linux-arm64" ;
5051 } ;
52+ aarch64-darwin = {
53+ hash = "sha256-B6Dmcbk8Z8qPr/0Xv9GfBxL6+7DaVmYNVRfBY9geCoY=" ;
54+ arch = "darwin-arm64" ;
55+ } ;
5156 } ;
5257
5358 base =
@@ -68,13 +73,12 @@ vscode-utils.buildVscodeMarketplaceExtension {
6873
6974 buildInputs = [
7075 jq
71- lttng-ust
7276 libkrb5
7377 zlib
7478 ( lib . getLib stdenv . cc . cc )
75- ] ;
79+ ] ++ lib . optionals stdenv . hostPlatform . isLinux [ lttng-ust ] ;
7680
77- dontAutoPatchelf = isx86Linux ;
81+ dontAutoPatchelf = isx86Linux || isDarwin ;
7882
7983 postPatch =
8084 ''
@@ -97,10 +101,15 @@ vscode-utils.buildVscodeMarketplaceExtension {
97101
98102 # Patching binaries
99103 chmod +x bin/cpptools bin/cpptools-srv bin/cpptools-wordexp debugAdapters/bin/OpenDebugAD7
104+ ''
105+ + lib . optionalString stdenv . hostPlatform . isLinux ''
100106 patchelf --replace-needed liblttng-ust.so.0 liblttng-ust.so.1 ./debugAdapters/bin/libcoreclrtraceptprovider.so
101107 ''
102108 + lib . optionalString isx86Linux ''
103109 chmod +x bin/libc.so
110+ ''
111+ + lib . optionalString isDarwin ''
112+ chmod +x debugAdapters/lldb-mi/bin/lldb-mi
104113 '' ;
105114
106115 # On aarch64 the binaries are statically linked
@@ -128,6 +137,7 @@ vscode-utils.buildVscodeMarketplaceExtension {
128137 platforms = [
129138 "x86_64-linux"
130139 "aarch64-linux"
140+ "aarch64-darwin"
131141 ] ;
132142 sourceProvenance = [ lib . sourceTypes . binaryNativeCode ] ;
133143 } ;
You can’t perform that action at this time.
0 commit comments