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, autoPatchelfHook,
callPackage, callPackage,
cargo,
config, config,
fetchurl, fetchurl,
jdk, jdk,
jq, jq,
lib, lib,
libcxxStdenv,
llvmPackages, llvmPackages,
llvmPackages_19,
makeRustPlatform,
moreutils, moreutils,
protobuf, protobuf,
python3Packages, python3Packages,
rustc,
stdenv, stdenv,
vscode-utils, vscode-utils,
zlib, zlib,
@ -5123,17 +5118,7 @@ let
}; };
}; };
vadimcn.vscode-lldb = callPackage ./vadimcn.vscode-lldb { 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;
};
valentjn.vscode-ltex = vscode-utils.buildVscodeMarketplaceExtension rec { valentjn.vscode-ltex = vscode-utils.buildVscodeMarketplaceExtension rec {
mktplcRef = { mktplcRef = {

View file

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

View file

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