33 lines
807 B
Nix
33 lines
807 B
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
esp-rs.url = "github:leighleighleigh/esp-rs-nix";
|
|
};
|
|
|
|
outputs = inputs @ { flake-parts, esp-rs, ... }:
|
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
|
systems = [ "x86_64-linux" ];
|
|
|
|
imports = [
|
|
"${esp-rs}/package.nix"
|
|
];
|
|
|
|
perSystem = { pkgs, self', ... }: {
|
|
devShells.default = pkgs.mkShell {
|
|
packages = [
|
|
self'.packages.esp-rs
|
|
pkgs.rust-analyzer
|
|
pkgs.rustup
|
|
pkgs.espflash
|
|
pkgs.pkg-config
|
|
pkgs.stdenv.cc
|
|
];
|
|
|
|
shellHook = ''
|
|
export RUSTUP_TOOLCHAIN=${self'.packages.esp-rs}
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
}
|