mirror of
https://github.com/kittywitch/esp32-c3-meepy.git
synced 2026-02-09 07:59:18 -08:00
feat: initial commit
This commit is contained in:
commit
7888da2541
10 changed files with 1515 additions and 0 deletions
68
flake.nix
Normal file
68
flake.nix
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
inputs = {
|
||||
esp-rs-nix = {
|
||||
url = "github:leighleighleigh/esp-rs-nix";
|
||||
};
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
};
|
||||
outputs = { nixpkgs, flake-utils, esp-rs-nix, ... }@inputs: let
|
||||
mkPkgs = system: (import nixpkgs) {
|
||||
inherit system;
|
||||
};
|
||||
eachSystemOutputs = flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = mkPkgs system;
|
||||
inherit (esp-rs-nix.packages.${system}) esp-rs;
|
||||
esp-shell = pkgs.mkShell rec {
|
||||
name = "esp-shell";
|
||||
|
||||
buildInputs = [
|
||||
esp-rs
|
||||
pkgs.rustup
|
||||
pkgs.espflash
|
||||
#pkgs.rust-analyzer
|
||||
pkgs.pkg-config
|
||||
pkgs.stdenv.cc
|
||||
#pkgs.bacon
|
||||
#pkgs.systemdMinimal
|
||||
#pkgs.lunarvim
|
||||
#pkgs.inotify-tools
|
||||
#pkgs.picocom
|
||||
#pkgs.vscode-fhs
|
||||
pkgs.libusb1
|
||||
pkgs.python3
|
||||
# Workspace command runners
|
||||
pkgs.just
|
||||
pkgs.mprocs
|
||||
# This is for parameterising the justfile
|
||||
pkgs.toml-cli
|
||||
pkgs.moreutils
|
||||
pkgs.gdb
|
||||
];
|
||||
|
||||
LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath buildInputs}";
|
||||
|
||||
shellHook = ''
|
||||
# custom bashrc stuff
|
||||
export PS1_PREFIX="(esp-rs)"
|
||||
. ~/.bashrc
|
||||
|
||||
export LD_LIBRARY_PATH="''${LD_LIBRARY_PATH}:${LD_LIBRARY_PATH}"
|
||||
# this is important - it tells rustup where to find the esp toolchain,
|
||||
# without needing to copy it into your local ~/.rustup/ folder.
|
||||
export RUSTUP_TOOLCHAIN=${esp-rs}
|
||||
|
||||
# Load shell completions for espflash
|
||||
if (which espflash >/dev/null 2>&1); then
|
||||
. <(espflash completions $(basename $SHELL))
|
||||
fi
|
||||
'';
|
||||
};
|
||||
in {
|
||||
devShells = {
|
||||
inherit esp-shell;
|
||||
default = esp-shell;
|
||||
};
|
||||
});
|
||||
in eachSystemOutputs;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue