diff options
| author | andromeda <andromeda@lenovo> | 2026-04-06 16:31:34 +0200 |
|---|---|---|
| committer | andromeda <andromeda@lenovo> | 2026-04-06 16:31:34 +0200 |
| commit | a5d01131120f538292cbbf831006ae4db80b0f7a (patch) | |
| tree | 88769ac1a6f157da6e21bda6c8aabbffdac10b92 /flake.nix | |
| parent | 202e26714acc31bdf984d2eb6bd114f1b37ab83f (diff) | |
use rust-overlay
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 24 |
1 files changed, 16 insertions, 8 deletions
@@ -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} ''; }; }; |
