vscode-extensions.vadimcn.vscode-lldb: init at 1.5.3
This commit is contained in:
parent
bd4805b659
commit
11c36334bf
@ -205,6 +205,7 @@
|
|||||||
, "vscode-css-languageserver-bin"
|
, "vscode-css-languageserver-bin"
|
||||||
, "vscode-html-languageserver-bin"
|
, "vscode-html-languageserver-bin"
|
||||||
, "vscode-json-languageserver-bin"
|
, "vscode-json-languageserver-bin"
|
||||||
|
, { "vscode-lldb-build-deps": "../../misc/vscode-extensions/vscode-lldb/build-deps" }
|
||||||
, "vue-cli"
|
, "vue-cli"
|
||||||
, "vue-language-server"
|
, "vue-language-server"
|
||||||
, "web-ext"
|
, "web-ext"
|
||||||
|
1184
pkgs/development/node-packages/node-packages.nix
generated
1184
pkgs/development/node-packages/node-packages.nix
generated
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, callPackage, vscode-utils, llvmPackages_8 }:
|
{ stdenv, callPackage, vscode-utils, llvmPackages_8, llvmPackages_latest }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (vscode-utils) buildVscodeMarketplaceExtension;
|
inherit (vscode-utils) buildVscodeMarketplaceExtension;
|
||||||
@ -178,6 +178,10 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
vadimcn.vscode-lldb = callPackage ./vscode-lldb {
|
||||||
|
lldb = llvmPackages_latest.lldb;
|
||||||
|
};
|
||||||
|
|
||||||
vscodevim.vim = buildVscodeMarketplaceExtension {
|
vscodevim.vim = buildVscodeMarketplaceExtension {
|
||||||
mktplcRef = {
|
mktplcRef = {
|
||||||
name = "vim";
|
name = "vim";
|
||||||
|
@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"name": "vscode-lldb",
|
||||||
|
"version": "1.5.3",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/json5": "^0.0.30",
|
||||||
|
"@types/mocha": "^7.0.1",
|
||||||
|
"@types/node": "^8.10.50",
|
||||||
|
"@types/vscode": "^1.31.0",
|
||||||
|
"@types/yauzl": "^2.9.0",
|
||||||
|
"json5": "^2.1.0",
|
||||||
|
"memory-streams": "^0.1.3",
|
||||||
|
"mocha": "^7.0.1",
|
||||||
|
"source-map-support": "^0.5.12",
|
||||||
|
"string-argv": "^0.3.1",
|
||||||
|
"ts-loader": "^6.2.1",
|
||||||
|
"typescript": "^3.7.0",
|
||||||
|
"vsce": "^1.73.0",
|
||||||
|
"vscode-debugadapter-testsupport": "^1.35.0",
|
||||||
|
"vscode-debugprotocol": "^1.35.0",
|
||||||
|
"webpack": "^4.39.1",
|
||||||
|
"webpack-cli": "^3.3.7",
|
||||||
|
"yauzl": "^2.10.0"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -9,13 +9,6 @@ include(cmake/CopyFiles.cmake)
|
||||||
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
set(CMAKE_INSTALL_PREFIX $ENV{HOME}/.vscode/extensions/vscode-lldb CACHE PATH "Install location")
|
||||||
|
|
||||||
|
-set(LLDB_ROOT $ENV{LLDB_ROOT} CACHE PATH "Root of LLDB build directory")
|
||||||
|
-if (LLDB_ROOT)
|
||||||
|
- message("Using LLDB from ${LLDB_ROOT}")
|
||||||
|
-else()
|
||||||
|
- message(FATAL_ERROR "LLDB_ROOT not set." )
|
||||||
|
-endif()
|
||||||
|
-
|
||||||
|
# General OS-specific definitions
|
||||||
|
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||||
|
set(DylibPrefix lib)
|
||||||
|
@@ -64,8 +57,9 @@ set(UpdateFile ${CMAKE_COMMAND} -E copy_if_different)
|
||||||
|
|
||||||
|
# Adapter
|
||||||
|
|
||||||
|
-add_subdirectory(adapter)
|
||||||
|
-add_subdirectory(lldb)
|
||||||
|
+add_custom_target(adapter)
|
||||||
|
+add_custom_target(lldb)
|
||||||
|
+add_custom_target(codelldb)
|
||||||
|
|
||||||
|
# Extension package content
|
||||||
|
|
||||||
|
@@ -74,16 +68,6 @@ configure_file(package.json ${CMAKE_CURRENT_BINARY_DIR}/package.json @ONLY)
|
||||||
|
configure_file(webpack.config.js ${CMAKE_CURRENT_BINARY_DIR}/webpack.config.js @ONLY)
|
||||||
|
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/package-lock.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
|
-# Run 'npm install'
|
||||||
|
-execute_process(
|
||||||
|
- COMMAND ${NPM} install
|
||||||
|
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||||
|
- RESULT_VARIABLE Result
|
||||||
|
-)
|
||||||
|
-if (NOT ${Result} EQUAL 0)
|
||||||
|
- message(FATAL_ERROR "npm intall failed: ${Result}")
|
||||||
|
-endif()
|
||||||
|
-
|
||||||
|
# Copy it back, so we can commit the lock file.
|
||||||
|
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/package-lock.json DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
106
pkgs/misc/vscode-extensions/vscode-lldb/default.nix
Normal file
106
pkgs/misc/vscode-extensions/vscode-lldb/default.nix
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
{ lib, stdenv, vscode-utils, fetchFromGitHub, rustPlatform, makeWrapper, jq
|
||||||
|
, nodePackages, cmake, nodejs, unzip, python3, lldb, breakpointHook
|
||||||
|
, setDefaultLldbPath ? true
|
||||||
|
}:
|
||||||
|
assert lib.versionAtLeast python3.version "3.5";
|
||||||
|
let
|
||||||
|
publisher = "vadimcn";
|
||||||
|
name = "vscode-lldb";
|
||||||
|
version = "1.5.3";
|
||||||
|
|
||||||
|
dylibExt = stdenv.hostPlatform.extensions.sharedLibrary;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "vadimcn";
|
||||||
|
repo = "vscode-lldb";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "1139945j3z0fxc3nlyvd81k0ypymqsj051idrbgbibwshpi86y93";
|
||||||
|
fetchSubmodules = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
adapter = rustPlatform.buildRustPackage {
|
||||||
|
pname = "${name}-adapter";
|
||||||
|
inherit version src;
|
||||||
|
|
||||||
|
cargoSha256 = "0jl4msf2jcjxddwqkx8fr0c35wg4vwvg5c19mihri1v34i09zc5r";
|
||||||
|
|
||||||
|
# It will pollute the build environment of `buildRustPackage`.
|
||||||
|
cargoPatches = [ ./reset-cargo-config.patch ];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
|
buildAndTestSubdir = "adapter";
|
||||||
|
|
||||||
|
# Hack: Need a nightly compiler.
|
||||||
|
RUSTC_BOOTSTRAP = 1;
|
||||||
|
|
||||||
|
# `adapter` expects a special hierarchy to resolve everything well.
|
||||||
|
postInstall = ''
|
||||||
|
mkdir -p $out/adapter
|
||||||
|
mv -t $out/adapter \
|
||||||
|
$out/bin/* \
|
||||||
|
$out/lib/* \
|
||||||
|
./adapter/*.py \
|
||||||
|
./formatters/*.py
|
||||||
|
rmdir $out/{bin,lib}
|
||||||
|
'';
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
wrapProgram $out/adapter/codelldb \
|
||||||
|
--prefix PATH : "${python3}/bin" \
|
||||||
|
--prefix LD_LIBRARY_PATH : "${python3}/lib"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
build-deps = nodePackages."vscode-lldb-build-deps-../../misc/vscode-extensions/vscode-lldb/build-deps";
|
||||||
|
|
||||||
|
vsix = stdenv.mkDerivation {
|
||||||
|
name = "${name}-${version}-vsix";
|
||||||
|
inherit src;
|
||||||
|
|
||||||
|
# Only build the extension. We handle `adapter` and `lldb` with nix.
|
||||||
|
patches = [ ./cmake-build-extension-only.patch ];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ cmake nodejs unzip breakpointHook ];
|
||||||
|
|
||||||
|
postConfigure = ''
|
||||||
|
cp -r ${build-deps}/lib/node_modules/vscode-lldb/{node_modules,package-lock.json} .
|
||||||
|
'';
|
||||||
|
|
||||||
|
makeFlags = [ "vsix_bootstrap" ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
unzip ./codelldb-bootstrap.vsix 'extension/*' -d ./vsix-extracted
|
||||||
|
mv vsix-extracted/extension $out
|
||||||
|
|
||||||
|
ln -s ${adapter}/adapter $out
|
||||||
|
# Mark that adapter and lldb are installed.
|
||||||
|
touch $out/platform.ok
|
||||||
|
'';
|
||||||
|
|
||||||
|
dontStrip = true;
|
||||||
|
dontPatchELF = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
in vscode-utils.buildVscodeExtension {
|
||||||
|
inherit name;
|
||||||
|
src = vsix;
|
||||||
|
|
||||||
|
nativeBuildInputs = lib.optional setDefaultLldbPath jq;
|
||||||
|
postUnpack = lib.optionalString setDefaultLldbPath ''
|
||||||
|
jq '.contributes.configuration.properties."lldb.library".default = $s' \
|
||||||
|
--arg s "${lldb}/lib/liblldb.so" \
|
||||||
|
$sourceRoot/package.json >$sourceRoot/package.json.new
|
||||||
|
mv $sourceRoot/package.json.new $sourceRoot/package.json
|
||||||
|
'';
|
||||||
|
|
||||||
|
vscodeExtUniqueId = "${publisher}.${name}";
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A native debugger extension for VSCode based on LLDB";
|
||||||
|
homepage = "https://github.com/vadimcn/vscode-lldb";
|
||||||
|
license = with licenses; [ mit ];
|
||||||
|
maintainers = with maintainers; [ oxalica ];
|
||||||
|
platforms = platforms.all;
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
--- a/.cargo/config
|
||||||
|
+++ b/.cargo/config
|
||||||
|
@@ -1,8 +0,0 @@
|
||||||
|
-[build]
|
||||||
|
-target-dir = "build/target"
|
||||||
|
-
|
||||||
|
-[target.armv7-unknown-linux-gnueabihf]
|
||||||
|
-linker = "arm-linux-gnueabihf-gcc"
|
||||||
|
-
|
||||||
|
-[target.aarch64-unknown-linux-gnu]
|
||||||
|
-linker = "aarch64-linux-gnu-gcc"
|
Loading…
x
Reference in New Issue
Block a user