Skip to content

Commit

Permalink
Find rust-src properly
Browse files Browse the repository at this point in the history
Copied the information from oxalica/rust-overlay#129 (comment)
  • Loading branch information
simonrw committed Jan 2, 2024
1 parent f67480f commit 9b1be00
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[toolchain]
channel = "beta"
components = ["rustfmt", "clippy", "rust-src"]
targets = []
10 changes: 5 additions & 5 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ with pkgs; let

custom-python =
python3.withPackages (ps: with ps; [debugpy black scapy structlog]);

toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
in
mkShell {
buildInputs =
[
rust-bin.beta.latest.default
rust-analyzer
toolchain
rust-analyzer-unwrapped
cargo-flamegraph
custom-python
cargo-hack
Expand All @@ -29,10 +31,8 @@ in

env = {
RUST_BACKTRACE = "1";

RUST_SRC_PATH = "${rustPlatform.rustLibSrc}";

RUST_LOG = "gui=trace,end_to_end=debug,transport=debug,dap_gui_client=debug,debugger=debug";
RUST_SRC_PATH = "${toolchain}/lib/rustlib/src/rust/library";

LD_LIBRARY_PATH =
if stdenv.isLinux
Expand Down

0 comments on commit 9b1be00

Please sign in to comment.