{ inputs = { flake-utils.url = "github:numtide/flake-utils"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; rust-overlay.url = "github:oxalica/rust-overlay"; }; outputs = { self, flake-utils, nixpkgs, rust-overlay }: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; overlays = [ rust-overlay.overlays.default ]; }; rust = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; in { devShell = pkgs.mkShell { buildInputs = [ rust pkgs.rust-analyzer-unwrapped ]; RUST_SRC_PATH = "${rust}/lib/rustlib/src/rust/library"; }; formatter = pkgs.nixpkgs-fmt; }); }