vscode-lldb: 1.6.10 -> 1.7.4 (#191133)

This commit is contained in:
Nick Hu 2022-09-19 01:42:18 +01:00 committed by GitHub
parent 1aa35f048a
commit b3a4ac83b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 3908 additions and 436 deletions

View file

@ -8,6 +8,7 @@
, python3Packages
, jdk
, llvmPackages_8
, llvmPackages_14
, nixpkgs-fmt
, protobuf
, jq
@ -2551,7 +2552,7 @@ let
};
};
vadimcn.vscode-lldb = callPackage ./vscode-lldb { };
vadimcn.vscode-lldb = callPackage ./vscode-lldb { llvmPackages = llvmPackages_14; };
valentjn.vscode-ltex = vscode-utils.buildVscodeMarketplaceExtension rec {
mktplcRef = {

View file

@ -0,0 +1,17 @@
# This file has been generated by node2nix 1.11.1. Do not edit!
{pkgs ? import <nixpkgs> {
inherit system;
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-14_x"}:
let
nodeEnv = import ./node-env.nix {
inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript;
inherit pkgs nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
};
in
import ./node-packages.nix {
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
inherit nodeEnv;
}

View file

@ -0,0 +1,598 @@
# This file originates from node2nix
{lib, stdenv, nodejs, python2, pkgs, libtool, runCommand, writeTextFile, writeShellScript}:
let
# Workaround to cope with utillinux in Nixpkgs 20.09 and util-linux in Nixpkgs master
utillinux = if pkgs ? utillinux then pkgs.utillinux else pkgs.util-linux;
python = if nodejs ? python then nodejs.python else python2;
# Create a tar wrapper that filters all the 'Ignoring unknown extended header keyword' noise
tarWrapper = runCommand "tarWrapper" {} ''
mkdir -p $out/bin
cat > $out/bin/tar <<EOF
#! ${stdenv.shell} -e
$(type -p tar) "\$@" --warning=no-unknown-keyword --delay-directory-restore
EOF
chmod +x $out/bin/tar
'';
# Function that generates a TGZ file from a NPM project
buildNodeSourceDist =
{ name, version, src, ... }:
stdenv.mkDerivation {
name = "node-tarball-${name}-${version}";
inherit src;
buildInputs = [ nodejs ];
buildPhase = ''
export HOME=$TMPDIR
tgzFile=$(npm pack | tail -n 1) # Hooks to the pack command will add output (https://docs.npmjs.com/misc/scripts)
'';
installPhase = ''
mkdir -p $out/tarballs
mv $tgzFile $out/tarballs
mkdir -p $out/nix-support
echo "file source-dist $out/tarballs/$tgzFile" >> $out/nix-support/hydra-build-products
'';
};
# Common shell logic
installPackage = writeShellScript "install-package" ''
installPackage() {
local packageName=$1 src=$2
local strippedName
local DIR=$PWD
cd $TMPDIR
unpackFile $src
# Make the base dir in which the target dependency resides first
mkdir -p "$(dirname "$DIR/$packageName")"
if [ -f "$src" ]
then
# Figure out what directory has been unpacked
packageDir="$(find . -maxdepth 1 -type d | tail -1)"
# Restore write permissions to make building work
find "$packageDir" -type d -exec chmod u+x {} \;
chmod -R u+w "$packageDir"
# Move the extracted tarball into the output folder
mv "$packageDir" "$DIR/$packageName"
elif [ -d "$src" ]
then
# Get a stripped name (without hash) of the source directory.
# On old nixpkgs it's already set internally.
if [ -z "$strippedName" ]
then
strippedName="$(stripHash $src)"
fi
# Restore write permissions to make building work
chmod -R u+w "$strippedName"
# Move the extracted directory into the output folder
mv "$strippedName" "$DIR/$packageName"
fi
# Change to the package directory to install dependencies
cd "$DIR/$packageName"
}
'';
# Bundle the dependencies of the package
#
# Only include dependencies if they don't exist. They may also be bundled in the package.
includeDependencies = {dependencies}:
lib.optionalString (dependencies != []) (
''
mkdir -p node_modules
cd node_modules
''
+ (lib.concatMapStrings (dependency:
''
if [ ! -e "${dependency.packageName}" ]; then
${composePackage dependency}
fi
''
) dependencies)
+ ''
cd ..
''
);
# Recursively composes the dependencies of a package
composePackage = { name, packageName, src, dependencies ? [], ... }@args:
builtins.addErrorContext "while evaluating node package '${packageName}'" ''
installPackage "${packageName}" "${src}"
${includeDependencies { inherit dependencies; }}
cd ..
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
'';
pinpointDependencies = {dependencies, production}:
let
pinpointDependenciesFromPackageJSON = writeTextFile {
name = "pinpointDependencies.js";
text = ''
var fs = require('fs');
var path = require('path');
function resolveDependencyVersion(location, name) {
if(location == process.env['NIX_STORE']) {
return null;
} else {
var dependencyPackageJSON = path.join(location, "node_modules", name, "package.json");
if(fs.existsSync(dependencyPackageJSON)) {
var dependencyPackageObj = JSON.parse(fs.readFileSync(dependencyPackageJSON));
if(dependencyPackageObj.name == name) {
return dependencyPackageObj.version;
}
} else {
return resolveDependencyVersion(path.resolve(location, ".."), name);
}
}
}
function replaceDependencies(dependencies) {
if(typeof dependencies == "object" && dependencies !== null) {
for(var dependency in dependencies) {
var resolvedVersion = resolveDependencyVersion(process.cwd(), dependency);
if(resolvedVersion === null) {
process.stderr.write("WARNING: cannot pinpoint dependency: "+dependency+", context: "+process.cwd()+"\n");
} else {
dependencies[dependency] = resolvedVersion;
}
}
}
}
/* Read the package.json configuration */
var packageObj = JSON.parse(fs.readFileSync('./package.json'));
/* Pinpoint all dependencies */
replaceDependencies(packageObj.dependencies);
if(process.argv[2] == "development") {
replaceDependencies(packageObj.devDependencies);
}
replaceDependencies(packageObj.optionalDependencies);
/* Write the fixed package.json file */
fs.writeFileSync("package.json", JSON.stringify(packageObj, null, 2));
'';
};
in
''
node ${pinpointDependenciesFromPackageJSON} ${if production then "production" else "development"}
${lib.optionalString (dependencies != [])
''
if [ -d node_modules ]
then
cd node_modules
${lib.concatMapStrings (dependency: pinpointDependenciesOfPackage dependency) dependencies}
cd ..
fi
''}
'';
# Recursively traverses all dependencies of a package and pinpoints all
# dependencies in the package.json file to the versions that are actually
# being used.
pinpointDependenciesOfPackage = { packageName, dependencies ? [], production ? true, ... }@args:
''
if [ -d "${packageName}" ]
then
cd "${packageName}"
${pinpointDependencies { inherit dependencies production; }}
cd ..
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
fi
'';
# Extract the Node.js source code which is used to compile packages with
# native bindings
nodeSources = runCommand "node-sources" {} ''
tar --no-same-owner --no-same-permissions -xf ${nodejs.src}
mv node-* $out
'';
# Script that adds _integrity fields to all package.json files to prevent NPM from consulting the cache (that is empty)
addIntegrityFieldsScript = writeTextFile {
name = "addintegrityfields.js";
text = ''
var fs = require('fs');
var path = require('path');
function augmentDependencies(baseDir, dependencies) {
for(var dependencyName in dependencies) {
var dependency = dependencies[dependencyName];
// Open package.json and augment metadata fields
var packageJSONDir = path.join(baseDir, "node_modules", dependencyName);
var packageJSONPath = path.join(packageJSONDir, "package.json");
if(fs.existsSync(packageJSONPath)) { // Only augment packages that exist. Sometimes we may have production installs in which development dependencies can be ignored
console.log("Adding metadata fields to: "+packageJSONPath);
var packageObj = JSON.parse(fs.readFileSync(packageJSONPath));
if(dependency.integrity) {
packageObj["_integrity"] = dependency.integrity;
} else {
packageObj["_integrity"] = "sha1-000000000000000000000000000="; // When no _integrity string has been provided (e.g. by Git dependencies), add a dummy one. It does not seem to harm and it bypasses downloads.
}
if(dependency.resolved) {
packageObj["_resolved"] = dependency.resolved; // Adopt the resolved property if one has been provided
} else {
packageObj["_resolved"] = dependency.version; // Set the resolved version to the version identifier. This prevents NPM from cloning Git repositories.
}
if(dependency.from !== undefined) { // Adopt from property if one has been provided
packageObj["_from"] = dependency.from;
}
fs.writeFileSync(packageJSONPath, JSON.stringify(packageObj, null, 2));
}
// Augment transitive dependencies
if(dependency.dependencies !== undefined) {
augmentDependencies(packageJSONDir, dependency.dependencies);
}
}
}
if(fs.existsSync("./package-lock.json")) {
var packageLock = JSON.parse(fs.readFileSync("./package-lock.json"));
if(![1, 2].includes(packageLock.lockfileVersion)) {
process.stderr.write("Sorry, I only understand lock file versions 1 and 2!\n");
process.exit(1);
}
if(packageLock.dependencies !== undefined) {
augmentDependencies(".", packageLock.dependencies);
}
}
'';
};
# Reconstructs a package-lock file from the node_modules/ folder structure and package.json files with dummy sha1 hashes
reconstructPackageLock = writeTextFile {
name = "addintegrityfields.js";
text = ''
var fs = require('fs');
var path = require('path');
var packageObj = JSON.parse(fs.readFileSync("package.json"));
var lockObj = {
name: packageObj.name,
version: packageObj.version,
lockfileVersion: 1,
requires: true,
dependencies: {}
};
function augmentPackageJSON(filePath, dependencies) {
var packageJSON = path.join(filePath, "package.json");
if(fs.existsSync(packageJSON)) {
var packageObj = JSON.parse(fs.readFileSync(packageJSON));
dependencies[packageObj.name] = {
version: packageObj.version,
integrity: "sha1-000000000000000000000000000=",
dependencies: {}
};
processDependencies(path.join(filePath, "node_modules"), dependencies[packageObj.name].dependencies);
}
}
function processDependencies(dir, dependencies) {
if(fs.existsSync(dir)) {
var files = fs.readdirSync(dir);
files.forEach(function(entry) {
var filePath = path.join(dir, entry);
var stats = fs.statSync(filePath);
if(stats.isDirectory()) {
if(entry.substr(0, 1) == "@") {
// When we encounter a namespace folder, augment all packages belonging to the scope
var pkgFiles = fs.readdirSync(filePath);
pkgFiles.forEach(function(entry) {
if(stats.isDirectory()) {
var pkgFilePath = path.join(filePath, entry);
augmentPackageJSON(pkgFilePath, dependencies);
}
});
} else {
augmentPackageJSON(filePath, dependencies);
}
}
});
}
}
processDependencies("node_modules", lockObj.dependencies);
fs.writeFileSync("package-lock.json", JSON.stringify(lockObj, null, 2));
'';
};
prepareAndInvokeNPM = {packageName, bypassCache, reconstructLock, npmFlags, production}:
let
forceOfflineFlag = if bypassCache then "--offline" else "--registry http://www.example.com";
in
''
# Pinpoint the versions of all dependencies to the ones that are actually being used
echo "pinpointing versions of dependencies..."
source $pinpointDependenciesScriptPath
# Patch the shebangs of the bundled modules to prevent them from
# calling executables outside the Nix store as much as possible
patchShebangs .
# Deploy the Node.js package by running npm install. Since the
# dependencies have been provided already by ourselves, it should not
# attempt to install them again, which is good, because we want to make
# it Nix's responsibility. If it needs to install any dependencies
# anyway (e.g. because the dependency parameters are
# incomplete/incorrect), it fails.
#
# The other responsibilities of NPM are kept -- version checks, build
# steps, postprocessing etc.
export HOME=$TMPDIR
cd "${packageName}"
runHook preRebuild
${lib.optionalString bypassCache ''
${lib.optionalString reconstructLock ''
if [ -f package-lock.json ]
then
echo "WARNING: Reconstruct lock option enabled, but a lock file already exists!"
echo "This will most likely result in version mismatches! We will remove the lock file and regenerate it!"
rm package-lock.json
else
echo "No package-lock.json file found, reconstructing..."
fi
node ${reconstructPackageLock}
''}
node ${addIntegrityFieldsScript}
''}
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${lib.optionalString production "--production"} rebuild
if [ "''${dontNpmInstall-}" != "1" ]
then
# NPM tries to download packages even when they already exist if npm-shrinkwrap is used.
rm -f npm-shrinkwrap.json
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${lib.optionalString production "--production"} install
fi
'';
# Builds and composes an NPM package including all its dependencies
buildNodePackage =
{ name
, packageName
, version ? null
, dependencies ? []
, buildInputs ? []
, production ? true
, npmFlags ? ""
, dontNpmInstall ? false
, bypassCache ? false
, reconstructLock ? false
, preRebuild ? ""
, dontStrip ? true
, unpackPhase ? "true"
, buildPhase ? "true"
, meta ? {}
, ... }@args:
let
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "preRebuild" "unpackPhase" "buildPhase" "meta" ];
in
stdenv.mkDerivation ({
name = "${name}${if version == null then "" else "-${version}"}";
buildInputs = [ tarWrapper python nodejs ]
++ lib.optional (stdenv.isLinux) utillinux
++ lib.optional (stdenv.isDarwin) libtool
++ buildInputs;
inherit nodejs;
inherit dontStrip; # Stripping may fail a build for some package deployments
inherit dontNpmInstall preRebuild unpackPhase buildPhase;
compositionScript = composePackage args;
pinpointDependenciesScript = pinpointDependenciesOfPackage args;
passAsFile = [ "compositionScript" "pinpointDependenciesScript" ];
installPhase = ''
source ${installPackage}
# Create and enter a root node_modules/ folder
mkdir -p $out/lib/node_modules
cd $out/lib/node_modules
# Compose the package and all its dependencies
source $compositionScriptPath
${prepareAndInvokeNPM { inherit packageName bypassCache reconstructLock npmFlags production; }}
# Create symlink to the deployed executable folder, if applicable
if [ -d "$out/lib/node_modules/.bin" ]
then
ln -s $out/lib/node_modules/.bin $out/bin
# Patch the shebang lines of all the executables
ls $out/bin/* | while read i
do
file="$(readlink -f "$i")"
chmod u+rwx "$file"
patchShebangs "$file"
done
fi
# Create symlinks to the deployed manual page folders, if applicable
if [ -d "$out/lib/node_modules/${packageName}/man" ]
then
mkdir -p $out/share
for dir in "$out/lib/node_modules/${packageName}/man/"*
do
mkdir -p $out/share/man/$(basename "$dir")
for page in "$dir"/*
do
ln -s $page $out/share/man/$(basename "$dir")
done
done
fi
# Run post install hook, if provided
runHook postInstall
'';
meta = {
# default to Node.js' platforms
platforms = nodejs.meta.platforms;
} // meta;
} // extraArgs);
# Builds a node environment (a node_modules folder and a set of binaries)
buildNodeDependencies =
{ name
, packageName
, version ? null
, src
, dependencies ? []
, buildInputs ? []
, production ? true
, npmFlags ? ""
, dontNpmInstall ? false
, bypassCache ? false
, reconstructLock ? false
, dontStrip ? true
, unpackPhase ? "true"
, buildPhase ? "true"
, ... }@args:
let
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" ];
in
stdenv.mkDerivation ({
name = "node-dependencies-${name}${if version == null then "" else "-${version}"}";
buildInputs = [ tarWrapper python nodejs ]
++ lib.optional (stdenv.isLinux) utillinux
++ lib.optional (stdenv.isDarwin) libtool
++ buildInputs;
inherit dontStrip; # Stripping may fail a build for some package deployments
inherit dontNpmInstall unpackPhase buildPhase;
includeScript = includeDependencies { inherit dependencies; };
pinpointDependenciesScript = pinpointDependenciesOfPackage args;
passAsFile = [ "includeScript" "pinpointDependenciesScript" ];
installPhase = ''
source ${installPackage}
mkdir -p $out/${packageName}
cd $out/${packageName}
source $includeScriptPath
# Create fake package.json to make the npm commands work properly
cp ${src}/package.json .
chmod 644 package.json
${lib.optionalString bypassCache ''
if [ -f ${src}/package-lock.json ]
then
cp ${src}/package-lock.json .
chmod 644 package-lock.json
fi
''}
# Go to the parent folder to make sure that all packages are pinpointed
cd ..
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
${prepareAndInvokeNPM { inherit packageName bypassCache reconstructLock npmFlags production; }}
# Expose the executables that were installed
cd ..
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
mv ${packageName} lib
ln -s $out/lib/node_modules/.bin $out/bin
'';
} // extraArgs);
# Builds a development shell
buildNodeShell =
{ name
, packageName
, version ? null
, src
, dependencies ? []
, buildInputs ? []
, production ? true
, npmFlags ? ""
, dontNpmInstall ? false
, bypassCache ? false
, reconstructLock ? false
, dontStrip ? true
, unpackPhase ? "true"
, buildPhase ? "true"
, ... }@args:
let
nodeDependencies = buildNodeDependencies args;
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "unpackPhase" "buildPhase" ];
in
stdenv.mkDerivation ({
name = "node-shell-${name}${if version == null then "" else "-${version}"}";
buildInputs = [ python nodejs ] ++ lib.optional (stdenv.isLinux) utillinux ++ buildInputs;
buildCommand = ''
mkdir -p $out/bin
cat > $out/bin/shell <<EOF
#! ${stdenv.shell} -e
$shellHook
exec ${stdenv.shell}
EOF
chmod +x $out/bin/shell
'';
# Provide the dependencies in a development shell through the NODE_PATH environment variable
inherit nodeDependencies;
shellHook = lib.optionalString (dependencies != []) ''
export NODE_PATH=${nodeDependencies}/lib/node_modules
export PATH="${nodeDependencies}/bin:$PATH"
'';
} // extraArgs);
in
{
buildNodeSourceDist = lib.makeOverridable buildNodeSourceDist;
buildNodePackage = lib.makeOverridable buildNodePackage;
buildNodeDependencies = lib.makeOverridable buildNodeDependencies;
buildNodeShell = lib.makeOverridable buildNodeShell;
}

File diff suppressed because it is too large Load diff

View file

@ -1,23 +0,0 @@
{
"name": "vscode-lldb",
"version": "1.6.8",
"dependencies": {
"string-argv": "^0.3.1",
"yaml": "^1.10.0",
"yauzl": "^2.10.0",
"@types/vscode": "^1.31.0",
"@types/node": "^8.10.50",
"@types/mocha": "^7.0.1",
"@types/yauzl": "^2.9.0",
"typescript": "^4.2.4",
"mocha": "^8.4.0",
"source-map-support": "^0.5.12",
"memory-streams": "^0.1.3",
"vscode-debugprotocol": "^1.47.0",
"vscode-debugadapter-testsupport": "^1.47.0",
"vsce": "=1.88.0",
"webpack": "^5.37.1",
"webpack-cli": "^4.7.0",
"ts-loader": "^8.0.0"
}
}

View file

@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 37745b5..cad11a0 100644
index 6ae4dfb..519f544 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,13 +16,6 @@ endif()
@ -13,10 +13,10 @@ index 37745b5..cad11a0 100644
- message(FATAL_ERROR "LLDB_PACKAGE not set." )
-endif()
-
set(TEST_TIMEOUT 5000 CACHE STRING "Test timeout [ms]")
# General OS-specific definitions
@@ -87,16 +80,6 @@ configure_file(package.json ${CMAKE_CURRENT_BINARY_DIR}/package.json @ONLY)
if (CMAKE_SYSROOT)
set(CMAKE_C_FLAGS "--sysroot=${CMAKE_SYSROOT} ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "--sysroot=${CMAKE_SYSROOT} ${CMAKE_CXX_FLAGS}")
@@ -93,16 +86,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})
@ -33,4 +33,20 @@ index 37745b5..cad11a0 100644
# Copy it back, so we can commit the lock file.
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/package-lock.json DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
@@ -154,6 +137,7 @@ add_custom_target(tests
add_copy_file(PackageFiles ${CMAKE_CURRENT_SOURCE_DIR}/README.md ${CMAKE_CURRENT_BINARY_DIR}/README.md)
add_copy_file(PackageFiles ${CMAKE_CURRENT_SOURCE_DIR}/CHANGELOG.md ${CMAKE_CURRENT_BINARY_DIR}/CHANGELOG.md)
+add_copy_file(PackageFiles ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE ${CMAKE_CURRENT_BINARY_DIR}/LICENSE)
add_copy_file(PackageFiles ${CMAKE_CURRENT_SOURCE_DIR}/images/lldb.png ${CMAKE_CURRENT_BINARY_DIR}/images/lldb.png)
add_copy_file(PackageFiles ${CMAKE_CURRENT_SOURCE_DIR}/images/user.svg ${CMAKE_CURRENT_BINARY_DIR}/images/user.svg)
add_copy_file(PackageFiles ${CMAKE_CURRENT_SOURCE_DIR}/images/users.svg ${CMAKE_CURRENT_BINARY_DIR}/images/users.svg)
@@ -170,6 +154,7 @@ add_custom_target(dev_debugging
set(PackagedFilesBootstrap
README.md
CHANGELOG.md
+ LICENSE
extension.js
images/*
syntaxes/*

View file

@ -1,11 +1,11 @@
{ lib, stdenv, fetchFromGitHub, rustPlatform, makeWrapper, callPackage
, nodePackages, cmake, nodejs, unzip, python3
{ pkgs, lib, stdenv, fetchFromGitHub, runCommand, rustPlatform, makeWrapper, llvmPackages
, nodePackages, cmake, nodejs, unzip, python3, pkg-config, libsecret
}:
assert lib.versionAtLeast python3.version "3.5";
let
publisher = "vadimcn";
pname = "vscode-lldb";
version = "1.6.10";
version = "1.7.4";
vscodeExtUniqueId = "${publisher}.${pname}";
@ -13,19 +13,17 @@ let
owner = "vadimcn";
repo = "vscode-lldb";
rev = "v${version}";
sha256 = "sha256-4PM/818UFHRZekfbdhS/Rz0Pu6HOjJEldi4YuBWECnI=";
sha256 = "sha256-yAB0qxeC2sWCQ1EcKG/7LsuUrxV/kbxkcOzRfAotxFc=";
};
lldb = callPackage ./lldb.nix {};
# need to build a custom version of lldb and llvm for enhanced rust support
lldb = (import ./lldb.nix { inherit fetchFromGitHub runCommand llvmPackages; });
adapter = rustPlatform.buildRustPackage {
pname = "${pname}-adapter";
inherit version src;
# It will pollute the build environment of `buildRustPackage`.
cargoPatches = [ ./reset-cargo-config.patch ];
cargoSha256 = "sha256-Ch1X2vN+p7oCqSs/GIu5IzG+pcSKmQ+VwP2T8ycRhos=";
cargoSha256 = "sha256-Ly7yIGB6kLy0c9RzWt8BFuX90dxu2QASocNTEdQA3yo=";
nativeBuildInputs = [ makeWrapper ];
@ -42,7 +40,14 @@ let
doCheck = false;
};
nodeDeps = nodePackages."vscode-lldb-build-deps-../../applications/editors/vscode/extensions/vscode-lldb/build-deps";
nodeDeps = ((import ./build-deps/default.nix {
inherit pkgs nodejs;
inherit (stdenv.hostPlatform) system;
}).nodeDependencies.override (old: {
inherit src version;
buildInputs = [pkg-config libsecret];
dontNpmInstall = true;
}));
in stdenv.mkDerivation {
pname = "vscode-extension-${publisher}-${pname}";
@ -55,7 +60,7 @@ in stdenv.mkDerivation {
patches = [ ./cmake-build-extension-only.patch ];
postConfigure = ''
cp -r ${nodeDeps}/lib/node_modules/vscode-lldb/{node_modules,package-lock.json} .
cp -r ${nodeDeps}/lib/{node_modules,package-lock.json} .
'';
cmakeFlags = [
@ -92,6 +97,7 @@ in stdenv.mkDerivation {
passthru = {
inherit lldb adapter;
updateScript = ./update.sh;
};
meta = with lib; {

View file

@ -0,0 +1,13 @@
diff --git a/bindings/python/CMakeLists.txt b/bindings/python/CMakeLists.txt
index 82a52da89a7e..5127dc1d8f41 100644
--- a/bindings/python/CMakeLists.txt
+++ b/bindings/python/CMakeLists.txt
@@ -160,7 +160,7 @@ function(finish_swig_python swig_target lldb_python_bindings_dir lldb_python_tar
if(LLDB_BUILD_FRAMEWORK)
set(LLDB_PYTHON_INSTALL_PATH ${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework/Versions/${LLDB_FRAMEWORK_VERSION}/Resources/Python)
else()
- set(LLDB_PYTHON_INSTALL_PATH ${LLDB_PYTHON_RELATIVE_PATH})
+ set(LLDB_PYTHON_INSTALL_PATH ${CMAKE_INSTALL_LIBDIR}/../${LLDB_PYTHON_RELATIVE_PATH})
endif()
if (NOT CMAKE_CFG_INTDIR STREQUAL ".")
string(REPLACE ${CMAKE_CFG_INTDIR} "\$\{CMAKE_INSTALL_CONFIG_NAME\}" LLDB_PYTHON_INSTALL_PATH ${LLDB_PYTHON_INSTALL_PATH})

View file

@ -1,23 +1,35 @@
# Patched lldb for Rust language support.
{ lldb_12, fetchFromGitHub }:
{ fetchFromGitHub, runCommand, llvmPackages }:
let
llvmSrc = fetchFromGitHub {
owner = "vadimcn";
repo = "llvm-project";
rev = "f2e9ff34256cd8c6feaf14359f88ad3f538ed687";
sha256 = "sha256-5UsCBu3rtt+l2HZiCswoQJPPh8T6y471TBF4AypdF9I=";
# codelldb/14.x branch
rev = "4c267c83cbb55fedf2e0b89644dc1db320fdfde7";
sha256 = "sha256-jM//ej6AxnRYj+8BAn4QrxHPT6HiDzK5RqHPSg3dCcw=";
};
in lldb_12.overrideAttrs (oldAttrs: {
src = "${llvmSrc}/lldb";
in (llvmPackages.lldb.overrideAttrs (oldAttrs: rec {
passthru = (oldAttrs.passthru or {}) // {
inherit llvmSrc;
};
patches = oldAttrs.patches ++ [
# backport of https://github.com/NixOS/nixpkgs/commit/0d3002334850a819d1a5c8283c39f114af907cd4
# remove when https://github.com/NixOS/nixpkgs/issues/166604 fixed
./fix-python-installation.patch
];
doInstallCheck = true;
postInstallCheck = (oldAttrs.postInstallCheck or "") + ''
# installCheck for lldb_14 currently broken
# https://github.com/NixOS/nixpkgs/issues/166604#issuecomment-1086103692
# ignore the oldAttrs installCheck
installCheckPhase = ''
versionOutput="$($out/bin/lldb --version)"
echo "'lldb --version' returns: $versionOutput"
echo "$versionOutput" | grep -q 'rust-enabled'
'';
})).override({
monorepoSrc = llvmSrc;
libllvm = llvmPackages.libllvm.override({ monorepoSrc = llvmSrc; });
})

View file

@ -1,19 +0,0 @@
diff --git a/.cargo/config b/.cargo/config
index c3c75e4..e69de29 100644
--- a/.cargo/config
+++ b/.cargo/config
@@ -1,14 +0,0 @@
-[build]
-target-dir = "build/target"
-
-[target.armv7-unknown-linux-gnueabihf]
-rustflags = [
- "-C", "link-arg=-fuse-ld=lld",
- "-C", "link-arg=--target=armv7-unknown-linux-gnueabihf",
-]
-
-[target.aarch64-unknown-linux-gnu]
-rustflags = [
- "-C", "link-arg=-fuse-ld=lld",
- "-C", "link-arg=--target=aarch64-unknown-linux-gnu",
-]

View file

@ -3,10 +3,6 @@
set -eo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
if [[ $# -ne 1 ]]; then
echo "Usage: ./update.sh <version>"
exit 1
fi
echo "
FIXME: This script doesn't update patched lldb. Please manually check branches
@ -19,28 +15,31 @@ nixFile=./default.nix
owner=vadimcn
repo=vscode-lldb
version="$1"
if [[ $# -ne 1 ]]; then
# no version specified, find the newest one
version=$(
curl -s "https://api.github.com/repos/$owner/$repo/releases" |
jq 'map(select(.prerelease | not)) | .[0].tag_name' --raw-output |
sed 's/[\"v]//'
)
fi
old_version=$(sed -nE 's/.*\bversion = "(.*)".*/\1/p' ./default.nix)
if grep -q 'cargoSha256 = ""' ./default.nix; then
old_version='broken'
fi
if [[ "$version" == "$old_version" ]]; then
echo "Up to date: $version"
exit
fi
echo "$old_version -> $version"
# update hashes
sed -E 's/\bversion = ".*?"/version = "'$version'"/' --in-place "$nixFile"
srcHash=$(nix-prefetch fetchFromGitHub --owner vadimcn --repo vscode-lldb --rev "v$version")
sed -E 's#\bsha256 = ".*?"#sha256 = "'$srcHash'"#' --in-place "$nixFile"
cargoHash=$(nix-prefetch "{ sha256 }: (import $nixpkgs {}).vscode-extensions.vadimcn.vscode-lldb.adapter.cargoDeps.overrideAttrs (_: { outputHash = sha256; })")
sed -E 's#\bcargoSha256 = ".*?"#cargoSha256 = "'$cargoHash'"#' --in-place "$nixFile"
# update node dependencies
src="$(nix-build $nixpkgs -A vscode-extensions.vadimcn.vscode-lldb.src --no-out-link)"
oldDeps="$(jq '.dependencies' build-deps/package.json)"
newDeps="$(jq '.dependencies + .devDependencies' "$src/package.json")"
jq '{ name, version: $version, dependencies: (.dependencies + .devDependencies) }' \
--arg version "$version" \
"$src/package.json" \
> build-deps/package.json
if [[ "$oldDeps" == "$newDeps" ]]; then
echo "Dependencies not changed"
sed '/"vscode-lldb-build-deps-/,+3 s/version = ".*"/version = "'"$version"'"/' \
--in-place "$nixpkgs/pkgs/development/node-packages/node-packages.nix"
else
echo "Dependencies changed"
# Regenerate nodePackages.
cd "$nixpkgs/pkgs/development/node-packages"
exec ./generate.sh
fi
nix-shell -p node2nix -I nixpkgs=$nixpkgs --run "cd build-deps && ls -R && node2nix -14 -d -i \"$src/package.json\" -l \"$src/package-lock.json\""

View file

@ -378,7 +378,6 @@
, "vscode-json-languageserver"
, "vscode-json-languageserver-bin"
, "vscode-langservers-extracted"
, { "vscode-lldb-build-deps": "../../applications/editors/vscode/extensions/vscode-lldb/build-deps" }
, "vue-cli"
, "vue-language-server"
, "wavedrom-cli"

View file

@ -135972,354 +135972,6 @@ in
bypassCache = true;
reconstructLock = true;
};
"vscode-lldb-build-deps-../../applications/editors/vscode/extensions/vscode-lldb/build-deps" = nodeEnv.buildNodePackage {
name = "vscode-lldb";
packageName = "vscode-lldb";
version = "1.6.8";
src = ../../applications/editors/vscode/extensions/vscode-lldb/build-deps;
dependencies = [
sources."@discoveryjs/json-ext-0.5.7"
sources."@jridgewell/gen-mapping-0.3.2"
sources."@jridgewell/resolve-uri-3.1.0"
sources."@jridgewell/set-array-1.1.2"
sources."@jridgewell/source-map-0.3.2"
sources."@jridgewell/sourcemap-codec-1.4.14"
sources."@jridgewell/trace-mapping-0.3.15"
sources."@types/eslint-8.4.6"
sources."@types/eslint-scope-3.7.4"
sources."@types/estree-0.0.51"
sources."@types/json-schema-7.0.11"
sources."@types/mocha-7.0.2"
sources."@types/node-8.10.66"
sources."@types/vscode-1.71.0"
sources."@types/yauzl-2.10.0"
sources."@ungap/promise-all-settled-1.1.2"
sources."@webassemblyjs/ast-1.11.1"
sources."@webassemblyjs/floating-point-hex-parser-1.11.1"
sources."@webassemblyjs/helper-api-error-1.11.1"
sources."@webassemblyjs/helper-buffer-1.11.1"
sources."@webassemblyjs/helper-numbers-1.11.1"
sources."@webassemblyjs/helper-wasm-bytecode-1.11.1"
sources."@webassemblyjs/helper-wasm-section-1.11.1"
sources."@webassemblyjs/ieee754-1.11.1"
sources."@webassemblyjs/leb128-1.11.1"
sources."@webassemblyjs/utf8-1.11.1"
sources."@webassemblyjs/wasm-edit-1.11.1"
sources."@webassemblyjs/wasm-gen-1.11.1"
sources."@webassemblyjs/wasm-opt-1.11.1"
sources."@webassemblyjs/wasm-parser-1.11.1"
sources."@webassemblyjs/wast-printer-1.11.1"
sources."@webpack-cli/configtest-1.2.0"
sources."@webpack-cli/info-1.5.0"
sources."@webpack-cli/serve-1.7.0"
sources."@xtuc/ieee754-1.2.0"
sources."@xtuc/long-4.2.2"
sources."acorn-8.8.0"
sources."acorn-import-assertions-1.8.0"
sources."ajv-6.12.6"
sources."ajv-keywords-3.5.2"
sources."ansi-colors-4.1.1"
sources."ansi-regex-3.0.1"
sources."ansi-styles-4.3.0"
sources."anymatch-3.1.2"
sources."argparse-2.0.1"
sources."azure-devops-node-api-10.2.2"
sources."balanced-match-1.0.2"
sources."big.js-5.2.2"
sources."binary-extensions-2.2.0"
sources."boolbase-1.0.0"
sources."brace-expansion-1.1.11"
sources."braces-3.0.2"
sources."browser-stdout-1.3.1"
sources."browserslist-4.21.3"
sources."buffer-crc32-0.2.13"
sources."buffer-from-1.1.2"
sources."call-bind-1.0.2"
sources."camelcase-6.3.0"
sources."caniuse-lite-1.0.30001399"
(sources."chalk-4.1.2" // {
dependencies = [
sources."supports-color-7.2.0"
];
})
sources."cheerio-1.0.0-rc.12"
sources."cheerio-select-2.1.0"
sources."chokidar-3.5.1"
sources."chrome-trace-event-1.0.3"
(sources."cliui-7.0.4" // {
dependencies = [
sources."ansi-regex-5.0.1"
sources."is-fullwidth-code-point-3.0.0"
sources."string-width-4.2.3"
sources."strip-ansi-6.0.1"
];
})
sources."clone-deep-4.0.1"
sources."color-convert-2.0.1"
sources."color-name-1.1.4"
sources."colorette-2.0.19"
sources."commander-6.2.1"
sources."concat-map-0.0.1"
sources."core-util-is-1.0.3"
sources."cross-spawn-7.0.3"
sources."css-select-5.1.0"
sources."css-what-6.1.0"
(sources."debug-4.3.1" // {
dependencies = [
sources."ms-2.1.2"
];
})
sources."decamelize-4.0.0"
sources."denodeify-1.2.1"
sources."diff-5.0.0"
sources."dom-serializer-2.0.0"
sources."domelementtype-2.3.0"
sources."domhandler-5.0.3"
sources."domutils-3.0.1"
sources."electron-to-chromium-1.4.248"
sources."emoji-regex-8.0.0"
sources."emojis-list-3.0.0"
sources."enhanced-resolve-5.10.0"
sources."entities-4.4.0"
sources."envinfo-7.8.1"
sources."errno-0.1.8"
sources."es-module-lexer-0.9.3"
sources."escalade-3.1.1"
sources."escape-string-regexp-4.0.0"
sources."eslint-scope-5.1.1"
(sources."esrecurse-4.3.0" // {
dependencies = [
sources."estraverse-5.3.0"
];
})
sources."estraverse-4.3.0"
sources."events-3.3.0"
sources."fast-deep-equal-3.1.3"
sources."fast-json-stable-stringify-2.1.0"
sources."fastest-levenshtein-1.0.16"
sources."fd-slicer-1.1.0"
sources."fill-range-7.0.1"
sources."find-up-5.0.0"
sources."flat-5.0.2"
sources."fs.realpath-1.0.0"
sources."fsevents-2.3.2"
sources."function-bind-1.1.1"
sources."get-caller-file-2.0.5"
sources."get-intrinsic-1.1.3"
sources."glob-7.1.6"
sources."glob-parent-5.1.2"
sources."glob-to-regexp-0.4.1"
sources."graceful-fs-4.2.10"
sources."growl-1.10.5"
sources."has-1.0.3"
sources."has-flag-4.0.0"
sources."has-symbols-1.0.3"
sources."he-1.2.0"
sources."htmlparser2-8.0.1"
sources."import-local-3.1.0"
sources."inflight-1.0.6"
sources."inherits-2.0.4"
sources."interpret-2.2.0"
sources."is-binary-path-2.1.0"
sources."is-core-module-2.10.0"
sources."is-extglob-2.1.1"
sources."is-fullwidth-code-point-2.0.0"
sources."is-glob-4.0.3"
sources."is-number-7.0.0"
sources."is-plain-obj-2.1.0"
sources."is-plain-object-2.0.4"
sources."isarray-0.0.1"
sources."isexe-2.0.0"
sources."isobject-3.0.1"
sources."jest-worker-27.5.1"
sources."js-yaml-4.0.0"
sources."json-parse-even-better-errors-2.3.1"
sources."json-schema-traverse-0.4.1"
sources."json5-2.2.1"
sources."kind-of-6.0.3"
sources."leven-3.1.0"
sources."linkify-it-2.2.0"
sources."loader-runner-4.3.0"
sources."loader-utils-2.0.2"
sources."locate-path-6.0.0"
sources."lodash-4.17.21"
sources."log-symbols-4.0.0"
sources."lru-cache-6.0.0"
(sources."markdown-it-10.0.0" // {
dependencies = [
sources."argparse-1.0.10"
sources."entities-2.0.3"
];
})
sources."mdurl-1.0.1"
(sources."memory-fs-0.5.0" // {
dependencies = [
sources."isarray-1.0.0"
sources."readable-stream-2.3.7"
sources."safe-buffer-5.1.2"
sources."string_decoder-1.1.1"
];
})
sources."memory-streams-0.1.3"
sources."merge-stream-2.0.0"
sources."micromatch-4.0.5"
sources."mime-1.6.0"
sources."mime-db-1.52.0"
sources."mime-types-2.1.35"
sources."minimatch-3.0.4"
sources."mocha-8.4.0"
sources."ms-2.1.3"
sources."mute-stream-0.0.8"
sources."nanoid-3.1.20"
sources."neo-async-2.6.2"
sources."node-releases-2.0.6"
sources."normalize-path-3.0.0"
sources."nth-check-2.1.1"
sources."object-inspect-1.12.2"
sources."once-1.4.0"
sources."os-homedir-1.0.2"
sources."os-tmpdir-1.0.2"
sources."osenv-0.1.5"
sources."p-limit-3.1.0"
sources."p-locate-5.0.0"
sources."p-try-2.2.0"
sources."parse-semver-1.1.1"
sources."parse5-7.1.1"
sources."parse5-htmlparser2-tree-adapter-7.0.0"
sources."path-exists-4.0.0"
sources."path-is-absolute-1.0.1"
sources."path-key-3.1.1"
sources."path-parse-1.0.7"
sources."pend-1.2.0"
sources."picocolors-1.0.0"
sources."picomatch-2.3.1"
(sources."pkg-dir-4.2.0" // {
dependencies = [
sources."find-up-4.1.0"
sources."locate-path-5.0.0"
sources."p-limit-2.3.0"
sources."p-locate-4.1.0"
];
})
sources."process-nextick-args-2.0.1"
sources."prr-1.0.1"
sources."punycode-2.1.1"
sources."qs-6.11.0"
sources."randombytes-2.1.0"
sources."read-1.0.7"
sources."readable-stream-1.0.34"
sources."readdirp-3.5.0"
sources."rechoir-0.7.1"
sources."require-directory-2.1.1"
sources."resolve-1.22.1"
sources."resolve-cwd-3.0.0"
sources."resolve-from-5.0.0"
sources."safe-buffer-5.2.1"
sources."schema-utils-3.1.1"
sources."semver-5.7.1"
sources."serialize-javascript-5.0.1"
sources."shallow-clone-3.0.1"
sources."shebang-command-2.0.0"
sources."shebang-regex-3.0.0"
sources."side-channel-1.0.4"
sources."source-map-0.6.1"
sources."source-map-support-0.5.21"
sources."sprintf-js-1.0.3"
sources."string-argv-0.3.1"
sources."string-width-2.1.1"
sources."string_decoder-0.10.31"
sources."strip-ansi-4.0.0"
sources."strip-json-comments-3.1.1"
sources."supports-color-8.1.1"
sources."supports-preserve-symlinks-flag-1.0.0"
sources."tapable-2.2.1"
(sources."terser-5.15.0" // {
dependencies = [
sources."commander-2.20.3"
];
})
(sources."terser-webpack-plugin-5.3.6" // {
dependencies = [
sources."serialize-javascript-6.0.0"
];
})
sources."tmp-0.0.29"
sources."to-regex-range-5.0.1"
(sources."ts-loader-8.4.0" // {
dependencies = [
sources."enhanced-resolve-4.5.0"
sources."semver-7.3.7"
sources."tapable-1.1.3"
];
})
sources."tunnel-0.0.6"
sources."typed-rest-client-1.8.9"
sources."typescript-4.8.3"
sources."uc.micro-1.0.6"
sources."underscore-1.13.4"
sources."update-browserslist-db-1.0.8"
sources."uri-js-4.4.1"
sources."url-join-1.1.0"
sources."util-deprecate-1.0.2"
(sources."vsce-1.88.0" // {
dependencies = [
sources."ansi-styles-3.2.1"
sources."chalk-2.4.2"
sources."color-convert-1.9.3"
sources."color-name-1.1.3"
sources."escape-string-regexp-1.0.5"
sources."has-flag-3.0.0"
sources."supports-color-5.5.0"
];
})
sources."vscode-debugadapter-testsupport-1.51.0"
sources."vscode-debugprotocol-1.51.0"
sources."watchpack-2.4.0"
sources."webpack-5.74.0"
(sources."webpack-cli-4.10.0" // {
dependencies = [
sources."commander-7.2.0"
];
})
sources."webpack-merge-5.8.0"
sources."webpack-sources-3.2.3"
sources."which-2.0.2"
sources."wide-align-1.1.3"
sources."wildcard-2.0.0"
sources."workerpool-6.1.0"
(sources."wrap-ansi-7.0.0" // {
dependencies = [
sources."ansi-regex-5.0.1"
sources."is-fullwidth-code-point-3.0.0"
sources."string-width-4.2.3"
sources."strip-ansi-6.0.1"
];
})
sources."wrappy-1.0.2"
sources."y18n-5.0.8"
sources."yallist-4.0.0"
sources."yaml-1.10.2"
(sources."yargs-16.2.0" // {
dependencies = [
sources."ansi-regex-5.0.1"
sources."is-fullwidth-code-point-3.0.0"
sources."string-width-4.2.3"
sources."strip-ansi-6.0.1"
];
})
sources."yargs-parser-20.2.4"
sources."yargs-unparser-2.0.0"
sources."yauzl-2.10.0"
sources."yazl-2.5.1"
sources."yocto-queue-0.1.0"
];
buildInputs = globalBuildInputs;
meta = {
};
production = true;
bypassCache = true;
reconstructLock = true;
};
vue-cli = nodeEnv.buildNodePackage {
name = "vue-cli";
packageName = "vue-cli";