Setup basic esp32c3 embassy
This commit is contained in:
commit
c1b98bb7d0
11 changed files with 1990 additions and 0 deletions
100
flake.nix
Normal file
100
flake.nix
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
{
|
||||
description = "Description for the project";
|
||||
|
||||
inputs = {
|
||||
devenv-root = {
|
||||
url = "file+file:///dev/null";
|
||||
flake = false;
|
||||
};
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
devenv.url = "github:cachix/devenv";
|
||||
nix2container.url = "github:nlewo/nix2container";
|
||||
nix2container.inputs.nixpkgs.follows = "nixpkgs";
|
||||
devenv.inputs.nixpkgs.follows = "nixpkgs";
|
||||
mk-shell-bin.url = "github:rrbutani/nix-mk-shell-bin";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
# crane = {
|
||||
# url = "github:ipetkov/crane";
|
||||
# inputs.nixpkgs.follows = "nixpkgs-old";
|
||||
# };
|
||||
fenix.url = "github:nix-community/fenix/monthly";
|
||||
fenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
crane.url = "github:ipetkov/crane";
|
||||
};
|
||||
|
||||
nixConfig = {
|
||||
extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
|
||||
extra-substituters = "https://devenv.cachix.org";
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs@{
|
||||
flake-parts,
|
||||
devenv-root,
|
||||
nixpkgs,
|
||||
...
|
||||
}:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
imports = [
|
||||
inputs.devenv.flakeModule
|
||||
];
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"i686-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-linux"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
|
||||
perSystem =
|
||||
{
|
||||
config,
|
||||
self',
|
||||
inputs',
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
{
|
||||
devenv.shells.default =
|
||||
let
|
||||
fnx = inputs'.fenix.packages;
|
||||
rustToolchain = fnx.combine [
|
||||
fnx.complete.cargo
|
||||
fnx.complete.clippy
|
||||
fnx.complete.rust-src
|
||||
fnx.complete.rustc
|
||||
fnx.complete.rustfmt
|
||||
fnx.targets.riscv32imc-unknown-none-elf.latest.rust-std
|
||||
];
|
||||
in
|
||||
{
|
||||
name = "my-project";
|
||||
|
||||
packages = [
|
||||
pkgs.dioxus-cli
|
||||
pkgs.espflash
|
||||
pkgs.cargo-espflash
|
||||
pkgs.cargo-expand
|
||||
|
||||
# Required for rust-src
|
||||
rustToolchain
|
||||
#pkgs.rust-rust-analyzer
|
||||
inputs'.fenix.packages.rust-analyzer
|
||||
#rustToolchain.rust-src
|
||||
|
||||
pkgs.slsnif
|
||||
];
|
||||
|
||||
# DO NOT ENABLE RUST because devenv messes up the ability
|
||||
# to build rust-src
|
||||
# languages.rust = {};
|
||||
|
||||
scripts.serial-sniff.exec = ''
|
||||
slsnif -u -n -s 115200 /dev/ttyACM0
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue