use rust-overlay
This commit is contained in:
24
flake.nix
24
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}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user