Here’s the wiki on the subject.
Hint: buildFHSEnv seems like the right choice since the installer probably expects a normal FHS-compliant Linux distro
Edit: Here’s a fresh post on how to use it: Using buildFHSEnv for dynamically linked libraries with esphome as example