Arduino IDE environment

I noticed that when running the Arduino IDE it would also download the toolchain for my ESP32, which obviously does not work on NixOS without patchelf.

However it is pretty straight forward to get it working using fhsUserEnv.
In case someone needs it:

$ nix-shell https://github.com/nix-community/nix-environments/archive/master.tar.gz -A arduino

Further infos

7 Likes

The ESP32 toolchain can also be obtained independently from Arduino, as described here: ESP-IDF - NixOS Wiki

I updated the file for the current toolchain version 2019r1:

1 Like

@fbmnds It seems that you have accidentally pasted the first file into your esp32-toolchain.nix.

There is a package arduino in the stable that seems to work: NixOS Search

Correct me please if the workaround above is still required.

I believe it is. Arduino IDE will still on-demand download the cross compiler toolchain for your board (for example, avr) into a subdirectory in your $HOME. And then it will fail to compile your code because those binaries are unpatched.