From b77f4b7dbcb19c0d36171af47272b2420f1ef35a Mon Sep 17 00:00:00 2001 From: grdddj Date: Fri, 4 Mar 2022 10:59:57 +0100 Subject: [PATCH] feat(shell.nix): enable rust extensions in VS Code --- ci/shell.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ci/shell.nix b/ci/shell.nix index e336a0ab9..69a9d8173 100644 --- a/ci/shell.nix +++ b/ci/shell.nix @@ -28,7 +28,8 @@ let ${nixpkgs.patchelf}/bin/patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$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 = [ "thumbv7em-none-eabihf" # TT "thumbv7m-none-eabi" # T1 @@ -127,6 +128,9 @@ stdenvNoCC.mkDerivation ({ # it's broken at the moment 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) { TREZOR_MONERO_TESTS_PATH = moneroTestsPatched; })