Skip to content

Commit

Permalink
feat: add RUST_SRC_PATH in case we can detect it (numtide#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
blaggacao authored Feb 26, 2023
1 parent 71e3022 commit 7389b00
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions extra/language/rust.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ with lib;
# append in case it needs to be modified
eval = "\"-L framework=$DEVSHELL_DIR/Library/Frameworks\"";
}
]
# fenix provides '.rust-src' in the 'complete' toolchain configuration
++ lib.optionals (cfg.enableDefaultToolchain && cfg.packageSet ? rust-src) [
{
# rust-analyzer may use this to quicker find the rust source
name = "RUST_SRC_PATH";
value = "${cfg.packageSet.rust-src}/lib/rustlib/src/rust/library";
}
];
};
}

0 comments on commit 7389b00

Please sign in to comment.