vscode-extensions.vadimcn.vscode-lldb: various adjustments following review

- Use `callPackage` instead of `import` for inner packages
- Change `libcxxStdenv` to `llvmPackages_19.libcxxStdenv`
- Move overrides from `.../vscode/extensions/default.nix` to
  `.../vscode/extensions/vadimcn.vscode-lldb/default.nix`
- adapter: Fix LLVM_TRIPLE
This commit is contained in:
Francis Gagné 2025-03-31 01:24:27 -04:00 committed by Masum Reza
parent d8b50484d3
commit 47c82b0cf5
3 changed files with 24 additions and 41 deletions

View file

@ -3,20 +3,15 @@
{
autoPatchelfHook,
callPackage,
cargo,
config,
fetchurl,
jdk,
jq,
lib,
libcxxStdenv,
llvmPackages,
llvmPackages_19,
makeRustPlatform,
moreutils,
protobuf,
python3Packages,
rustc,
stdenv,
vscode-utils,
zlib,
@ -5123,17 +5118,7 @@ let
};
};
vadimcn.vscode-lldb = callPackage ./vadimcn.vscode-lldb {
llvmPackages = llvmPackages_19;
# The adapter is meant to be compiled with clang++,
# based on the provided CMake toolchain files.
# <https://github.com/vadimcn/codelldb/tree/master/cmake>
rustPlatform = makeRustPlatform {
stdenv = libcxxStdenv;
inherit cargo rustc;
};
stdenv = libcxxStdenv;
};
vadimcn.vscode-lldb = callPackage ./vadimcn.vscode-lldb { };
valentjn.vscode-ltex = vscode-utils.buildVscodeMarketplaceExtension rec {
mktplcRef = {

View file

@ -18,7 +18,7 @@ let
"/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/debugserver"
else
"${lib.getBin lldb}/bin/lldb-server";
LLVM_TRIPLE = stdenv.hostPlatform.config;
LLVM_TRIPLE = stdenv.buildPlatform.rust.rustcTarget;
in
rustPlatform.buildRustPackage {
pname = "${pname}-adapter";

View file

@ -1,17 +1,17 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
makeWrapper,
llvmPackages,
buildNpmPackage,
callPackage,
cargo,
cmake,
fetchFromGitHub,
lib,
llvmPackages_19,
makeRustPlatform,
makeWrapper,
nodejs,
unzip,
python3,
pkg-config,
libsecret,
rustc,
stdenv,
unzip,
}:
assert lib.versionAtLeast python3.version "3.5";
let
@ -30,17 +30,20 @@ let
hash = "sha256-+Pe7ij5ukF5pLgwvr+HOHjIv1TQDiPOEeJtkpIW9XWI=";
};
lldb = llvmPackages.lldb;
lldb = llvmPackages_19.lldb;
adapter = (
import ./adapter.nix {
inherit
lib
lldb
makeWrapper
rustPlatform
stdenv
callPackage ./adapter.nix {
# The adapter is meant to be compiled with clang++,
# based on the provided CMake toolchain files.
# <https://github.com/vadimcn/codelldb/tree/master/cmake>
rustPlatform = makeRustPlatform {
stdenv = llvmPackages_19.libcxxStdenv;
inherit cargo rustc;
};
stdenv = llvmPackages_19.libcxxStdenv;
inherit
pname
src
version
@ -49,13 +52,8 @@ let
);
nodeDeps = (
import ./node_deps.nix {
callPackage ./node_deps.nix {
inherit
buildNpmPackage
libsecret
pkg-config
python3
pname
src
version