diff options
Diffstat (limited to 'pkgs/applications/editors/vscode/extensions/vscode-lldb/lldb.nix')
-rw-r--r-- | pkgs/applications/editors/vscode/extensions/vscode-lldb/lldb.nix | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/pkgs/applications/editors/vscode/extensions/vscode-lldb/lldb.nix b/pkgs/applications/editors/vscode/extensions/vscode-lldb/lldb.nix new file mode 100644 index 00000000000..e04e9ad0b5b --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/vscode-lldb/lldb.nix @@ -0,0 +1,23 @@ +# Patched lldb for Rust language support. +{ lldb_12, fetchFromGitHub }: +let + llvmSrc = fetchFromGitHub { + owner = "vadimcn"; + repo = "llvm-project"; + rev = "f2e9ff34256cd8c6feaf14359f88ad3f538ed687"; + sha256 = "sha256-5UsCBu3rtt+l2HZiCswoQJPPh8T6y471TBF4AypdF9I="; + }; +in lldb_12.overrideAttrs (oldAttrs: { + src = "${llvmSrc}/lldb"; + + passthru = (oldAttrs.passthru or {}) // { + inherit llvmSrc; + }; + + doInstallCheck = true; + postInstallCheck = (oldAttrs.postInstallCheck or "") + '' + versionOutput="$($out/bin/lldb --version)" + echo "'lldb --version' returns: $versionOutput" + echo "$versionOutput" | grep -q 'rust-enabled' + ''; +}) |