1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-18 04:18:10 +00:00

feat(shell.nix): enable rust extensions in VS Code

This commit is contained in:
grdddj 2022-03-04 10:59:57 +01:00 committed by Jiří Musil
parent 42fab282af
commit b77f4b7dbc

View File

@ -28,7 +28,8 @@ let
${nixpkgs.patchelf}/bin/patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out" ${nixpkgs.patchelf}/bin/patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out"
chmod -w $out chmod -w $out
''; '';
rustStable = nixpkgs.rust-bin.stable."1.58.1".minimal.override { rustProfiles = nixpkgs.rust-bin.stable."1.58.1";
rustStable = rustProfiles.minimal.override {
targets = [ targets = [
"thumbv7em-none-eabihf" # TT "thumbv7em-none-eabihf" # TT
"thumbv7m-none-eabi" # T1 "thumbv7m-none-eabi" # T1
@ -127,6 +128,9 @@ stdenvNoCC.mkDerivation ({
# it's broken at the moment # it's broken at the moment
hardeningDisable = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ "stackprotector" ]; hardeningDisable = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ "stackprotector" ];
# Enabling rust-analyzer extension in VSCode
RUST_SRC_PATH = "${rustProfiles.rust-src}/lib/rustlib/src/rust/library";
} // (lib.optionalAttrs fullDeps) { } // (lib.optionalAttrs fullDeps) {
TREZOR_MONERO_TESTS_PATH = moneroTestsPatched; TREZOR_MONERO_TESTS_PATH = moneroTestsPatched;
}) })