ESP-IDF: Difference between revisions
imported>Wirew0rm Add the cryptography python package which is required by ESP-IDF |
imported>Staff-d Add new dependencies (cmake and glibcLocales as well as the python dependencies setuptools, pyelftools, pyparsing, click) and add IDF_TOOLS_PATH variable to the shell hook to enable the usage of idf.py |
||
Line 65: | Line 65: | ||
let | let | ||
inherit (nixpkgs) pkgs; | inherit (nixpkgs) pkgs; | ||
# esp-idf as of Nov 2019 requires pyparsing < 2.4 | |||
python2 = let | |||
packageOverrides = self: super: { | |||
pyparsing = super.pyparsing.overridePythonAttrs( old: rec { | |||
version = "2.3.1"; | |||
src = super.fetchPypi { | |||
pname="pyparsing"; | |||
inherit version; | |||
sha256="66c9268862641abcac4a96ba74506e594c884e3f57690a696d21ad8210ed667a"; | |||
}; | |||
}); | |||
}; | |||
in pkgs.python2.override{inherit packageOverrides; self= python2;}; | |||
in | in | ||
pkgs.stdenv.mkDerivation { | pkgs.stdenv.mkDerivation { | ||
name = "esp-idf-env"; | name = "esp-idf-env"; | ||
src = ./esp-idf; | |||
dontBuild = true; | |||
dontConfigure = true; | |||
buildInputs = with pkgs; [ | buildInputs = with pkgs; [ | ||
gawk gperf gettext automake bison flex texinfo help2man libtool autoconf ncurses5 | gawk gperf gettext automake bison flex texinfo help2man libtool autoconf ncurses5 cmake glibcLocales | ||
(python2.withPackages (ppkgs: with ppkgs; [ pyserial future cryptography ])) | (python2.withPackages (ppkgs: with ppkgs; [ pyserial future cryptography setuptools pyelftools pyparsing click ])) | ||
(pkgs.callPackage ~/esp/esp32-toolchain.nix {}) | (pkgs.callPackage ~/esp/esp32-toolchain.nix {}) | ||
]; | ]; | ||
Line 77: | Line 94: | ||
export NIX_CFLAGS_LINK=-lncurses | export NIX_CFLAGS_LINK=-lncurses | ||
export IDF_PATH=$HOME/esp/esp-idf | export IDF_PATH=$HOME/esp/esp-idf | ||
export IDF_TOOLS_PATH=$HOME/esp/esp-idf/tools | |||
export PATH="$IDF_TOOLS_PATH:$PATH" | |||
''; | ''; | ||
} | } |