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
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.