Jump to content

ESP-IDF: Difference between revisions

1 byte removed ,  3 November 2021
m
Move Python venv note below shell.nix and put in Note: box
imported>Mirrexagon
(Updated toolchain derivation to latest as of 2021-11-03, overhauled shell.nix to create a Python venv)
imported>Mirrexagon
m (Move Python venv note below shell.nix and put in Note: box)
Line 59: Line 59:


Now that we have ESP-IDF in place, it's time to set up the <code>nix-shell</code> environment with all the dependencies we need.
Now that we have ESP-IDF in place, it's time to set up the <code>nix-shell</code> environment with all the dependencies we need.
Note that this environment uses a Python virtual environment and pip to get all the necessary Python dependencies, which is easier to keep up to date than using Python packages from Nix (at the cost of some reproducibility). The virtual environment is created if it doesn't already exist. When updating ESP-IDF, delete the <code>.python_env</code> directory and re-run <code>nix-shell</code>.


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
Line 115: Line 113:
nix-shell
nix-shell
</syntaxhighlight>
</syntaxhighlight>
{{note|This environment uses a Python virtual environment and pip to get all the necessary Python dependencies, which is easier to keep up to date than using Python packages from Nix (at the cost of some reproducibility). The virtual environment is created if it doesn't already exist. When updating ESP-IDF, delete the <code>.python_env</code> directory and re-run <code>nix-shell</code>.}}


That's all you need to start developing with ESP-IDF on NixOS!
That's all you need to start developing with ESP-IDF on NixOS!
Anonymous user