35 lines
1 KiB
Nix
35 lines
1 KiB
Nix
{
|
|
description = "A Nix-flake-based Rust ESP IDF development environment";
|
|
|
|
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
outputs = { self, nixpkgs }:
|
|
let
|
|
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
|
|
|
nixpkgs-esp-dev = builtins.fetchGit {
|
|
url = "https://github.com/mirrexagon/nixpkgs-esp-dev.git";
|
|
|
|
# Optionally pin to a specific commit of `nixpkgs-esp-dev`.
|
|
rev = "f37890edc9b327fcbc6d48c4cf174e65e4c0d148";
|
|
};
|
|
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
|
|
pkgs = import nixpkgs { inherit system; overlays = [ (import "${nixpkgs-esp-dev}/overlay.nix") ]; };
|
|
});
|
|
in
|
|
{
|
|
devShells = forEachSupportedSystem
|
|
({ pkgs }: {
|
|
default = pkgs.mkShell
|
|
{
|
|
packages = with pkgs; [
|
|
esp-idf-full
|
|
espflash
|
|
cargo-espflash
|
|
espup
|
|
];
|
|
};
|
|
});
|
|
};
|
|
}
|
|
|