From a5d01131120f538292cbbf831006ae4db80b0f7a Mon Sep 17 00:00:00 2001 From: andromeda Date: Mon, 6 Apr 2026 16:31:34 +0200 Subject: use rust-overlay --- flake.nix | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 1b20e74..08806f4 100644 --- a/flake.nix +++ b/flake.nix @@ -1,23 +1,31 @@ { inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + rust-overlay = { + inputs.nixpkgs.follows = "nixpkgs"; + url = "github:oxalica/rust-overlay"; + }; }; - outputs = {nixpkgs, ...}: let - pkgs = nixpkgs.legacyPackages.x86_64-linux; - esp-rs = pkgs.callPackage ./nix/esp-rs.nix {}; + outputs = { + nixpkgs, + rust-overlay, + ... + }: let + pkgs = import nixpkgs { + system = "x86_64-linux"; + overlays = [(import rust-overlay)]; + }; + rust-bin = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; in { devShells.x86_64-linux.default = pkgs.mkShell { buildInputs = [ - pkgs.pkg-config - pkgs.libudev-zero - pkgs.libusb1 pkgs.espflash pkgs.esp-generate pkgs.rust-analyzer - esp-rs + rust-bin ]; shellHook = '' - export RUSTUP_TOOLCHAIN=${esp-rs} + export RUSTUP_TOOLCHAIN=${rust-bin} ''; }; }; -- cgit v1.3.1