Skip to content

Commit 87fe42d

Browse files
committed
vscode-extensions.vadimcn.vscode-lldb: cleanup lldb derivation
1 parent 20d2e6d commit 87fe42d

File tree

2 files changed

+21
-22
lines changed

2 files changed

+21
-22
lines changed

pkgs/applications/editors/vscode/extensions/vadimcn.vscode-lldb/default.nix

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
lib,
33
stdenv,
44
fetchFromGitHub,
5-
runCommand,
65
rustPlatform,
76
makeWrapper,
87
llvmPackages,
@@ -33,7 +32,7 @@ let
3332
};
3433

3534
# need to build a custom version of lldb and llvm for enhanced rust support
36-
lldb = (import ./lldb.nix { inherit fetchFromGitHub runCommand llvmPackages; });
35+
lldb = (import ./lldb.nix { inherit fetchFromGitHub llvmPackages; });
3736

3837
adapter = rustPlatform.buildRustPackage {
3938
pname = "${pname}-adapter";
Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Patched lldb for Rust language support.
22
{
33
fetchFromGitHub,
4-
runCommand,
54
llvmPackages,
65
}:
76
let
@@ -12,24 +11,25 @@ let
1211
rev = "4c267c83cbb55fedf2e0b89644dc1db320fdfde7";
1312
hash = "sha256-jM//ej6AxnRYj+8BAn4QrxHPT6HiDzK5RqHPSg3dCcw=";
1413
};
15-
in
16-
(llvmPackages.lldb.overrideAttrs (oldAttrs: rec {
17-
passthru = (oldAttrs.passthru or { }) // {
18-
inherit llvmSrc;
19-
};
2014

21-
doInstallCheck = true;
15+
lldbDrv = llvmPackages.lldb.overrideAttrs (oldAttrs: {
16+
passthru = (oldAttrs.passthru or { }) // {
17+
inherit llvmSrc;
18+
};
2219

23-
# installCheck for lldb_14 currently broken
24-
# https://github.com/NixOS/nixpkgs/issues/166604#issuecomment-1086103692
25-
# ignore the oldAttrs installCheck
26-
installCheckPhase = ''
27-
versionOutput="$($out/bin/lldb --version)"
28-
echo "'lldb --version' returns: $versionOutput"
29-
echo "$versionOutput" | grep -q 'rust-enabled'
30-
'';
31-
})).override
32-
({
33-
monorepoSrc = llvmSrc;
34-
libllvm = llvmPackages.libllvm.override ({ monorepoSrc = llvmSrc; });
35-
})
20+
doInstallCheck = true;
21+
22+
# installCheck for lldb_14 currently broken
23+
# https://github.com/NixOS/nixpkgs/issues/166604#issuecomment-1086103692
24+
# ignore the oldAttrs installCheck
25+
installCheckPhase = ''
26+
versionOutput="$($out/bin/lldb --version)"
27+
echo "'lldb --version' returns: $versionOutput"
28+
echo "$versionOutput" | grep -q 'rust-enabled'
29+
'';
30+
});
31+
in
32+
lldbDrv.override {
33+
monorepoSrc = llvmSrc;
34+
libllvm = llvmPackages.libllvm.override { monorepoSrc = llvmSrc; };
35+
}

0 commit comments

Comments
 (0)