Helix + rust-analyzer: "Failed to spawn one or more proc-macro servers."

Hello guys!
I’m using the helix editor with rust-analyzer for rust and I’m using a devShell for this. Here is my flake.nix for rust development:

{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    rust-overlay.url = "github:oxalica/rust-overlay";
  };

  outputs = {nixpkgs, rust-overlay, ...}:
  let
    system = "x86_64-linux";
    pkgs = import nixpkgs {
      inherit system;

      overlays = [ rust-overlay.overlays.default ];
    };
  in
  pkgs.mkShell rec {
    packages = with pkgs; [ rust-bin.stable.latest.default ];

    buildInputs = with pkgs; [
      rustup

      xorg.libX11
      xorg.libXcursor
      xorg.libXrandr
      xorg.libXi
      xorg.libxkbfile
      xorg.xkbutils
      xorg.xkbevd
      xorg.libXScrnSaver
      libxkbcommon

      dbus
      pango

      pkg-config

      cargo-nextest
      cargo-cross

      shaderc
      directx-shader-compiler
      libGL
      vulkan-headers
      vulkan-loader
      vulkan-tools

      pcsctools
      pcsclite

      cmake
      fontconfig
    ];

    shellHook = import ../shared_hook.nix;

    LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:${builtins.toString (pkgs.lib.makeLibraryPath buildInputs)}";
    CARGO_BUILD_RUSTDOCFLAGS = "--default-theme=ayu";
  }
}

And here is the error message which I’m getting from hx --log /tmp/helix.log:

2023-11-24T23:22:17.422 helix_term::application [WARN] unhandled window/showMessage:
ShowMessageParams { typ: Warning, message: "Failed to spawn one or more proc-macro servers.
- cannot find proc-macro-srv, the workspace `/home/tornax/Programming/rio` is missing a sysroot
Failed to find sysroot for Cargo.toml file /home/tornax/Programming/rio/Cargo.toml.
Is rust-src installed? can't load standard library from sysroot
/nix/store/sqkljccnixkd52rccnz4apn865b07pvv-rust-default-1.74.0
(discovered via `rustc --print sysroot`)
try installing the Rust source the same way you installed rustc"

I also did a rustup component add rust-src but nothing changed.

What happens if you don’t use your overlay, but just add the regular cargo and rustc to your buildInputs instead?

I might look into this myself in more detail tomorrow otherwise. But I haven’t used Helix with Rust in a while.

Ok, the solution for this is, to make use of rust-overlay and add the rust-analyzer and rust-src extensions over there.