Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@
src,
version,
}:
let
# debugservers on macOS require the 'com.apple.security.cs.debugger'
# entitlement which nixpkgs' lldb-server does not yet provide; see
# <https://github.com/NixOS/nixpkgs/pull/38624> for details
lldbServer =
if stdenv.hostPlatform.isDarwin then
"/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/debugserver"
else
"${lldb.out}/bin/lldb-server";
in
rustPlatform.buildRustPackage {
pname = "${pname}-adapter";
inherit version src;
Expand Down Expand Up @@ -43,11 +53,13 @@ rustPlatform.buildRustPackage {
cp -t $out/share/formatters formatters/*.py
ln -s ${lib.getLib lldb} $out/share/lldb
makeWrapper $out/share/adapter/codelldb $out/bin/codelldb \
--set-default LLDB_DEBUGSERVER_PATH "${lldb.out}/bin/lldb-server"
--set-default LLDB_DEBUGSERVER_PATH "${lldbServer}"
'';

patches = [ ./patches/adapter-output-shared_object.patch ];

# Tests are linked to liblldb but it is not available here.
doCheck = false;

passthru = { inherit lldbServer; };
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,6 @@ let
}
);

# debugservers on macOS require the 'com.apple.security.cs.debugger'
# entitlement which nixpkgs' lldb-server does not yet provide; see
# <https://github.com/NixOS/nixpkgs/pull/38624> for details
lldbServer =
if stdenv.hostPlatform.isDarwin then
"/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/debugserver"
else
"${lldb.out}/bin/lldb-server";
in
stdenv.mkDerivation {
pname = "vscode-extension-${publisher}-${pname}";
Expand Down Expand Up @@ -130,7 +122,7 @@ stdenv.mkDerivation {
cp -t $ext/ -r ${adapter}/share/*
wrapProgram $ext/adapter/codelldb \
--prefix LD_LIBRARY_PATH : "$ext/lldb/lib" \
--set-default LLDB_DEBUGSERVER_PATH "${lldbServer}"
--set-default LLDB_DEBUGSERVER_PATH "${adapter.lldbServer}"
# Mark that all components are installed.
touch $ext/platform.ok

Expand All @@ -153,7 +145,7 @@ stdenv.mkDerivation {
description = "Native debugger extension for VSCode based on LLDB";
homepage = "https://github.com/vadimcn/vscode-lldb";
license = [ lib.licenses.mit ];
maintainers = [ ];
maintainers = [ lib.maintainers.r4v3n6101 ];
platforms = lib.platforms.all;
};
}