'What is the right way to give Flatpak access to system binaries?

I'm using the flatpak version of Atom. A lot of my extentions require paths to executable binaries such as the php binary for code completion.

Now Flatpak blacklists the /usr directory, do when I pass the /usr/bin/php directory it doesn't find the proper binary even if the binary is installed and it's directory is added to the PATH environment variable of the flatpak.

So what is the correct way to do it? I've also stumbled upon flatpak versions of the binaries themselves as extentions of the org.freedesktop.Sdk package, but if I'm to use those, how do I pass them to an Atom extention that requires a path to an executable?

Addendum: I recognise that there are workarounds such as not using Flatpak Atom and using the deb package instead, or using a different IDE flatpak that has the required binaries provided, but I'm interested in a solution to this specific case.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source