Oof. That’s a repo and a half. Looks like they completely hand-built a build system just for this project. Or is this some weird, ancient eclipse feature? Either way you’re going to have a field day if you want to build this.
This is pretty much correct, a build should only be able to write to a specific directory (the
$out directory in your
installphase), as well as a temporary directory in
/tmp (which is the current working directory in all shells started for the build).
It’s not allowed to write anywhere else. Problem is, some build systems are messy, and try to write to, for example,
/usr/bin so they can helpfully install their binaries for you. This appears to be such a build system - it assumes you’re on an fhs distro, and rather than “compile” you want to “compile and immediately install”.
Nix’ sandbox won’t allow it to just edit any file on your computer, so you get a permission error.
Given the above, no, that would not be helpful.
The “correct” way is for upstream to use a more sensible build system. Since it does not, you’ll have to learn how their build system works.
I can’t spot any way to configure its installation prefix from a glance, it looks to be hardcoded, but I can’t spot where that is. It also appears to download stuff at build time, rather than using already installed libraries, which is also forbidden during nix builds. This is not promising.
I think the path of least resistance would be to reimplement their
compile_all from scratch in your
buildPhase. The script’s errors do say you should do the buuld manually if it doesn’t work, so this is an expected outcome.
It might turn out to be surprisingly easy to do so (most of their code revolves around working on windows/mac/ubuntu), but you’ll have to spend quite a while untangling what their code even does. It’ll bitrot quickly too, any small change to their build system will break your builds if you update. Maybe if you understand it well enough to reimplement it you’ll be able to configure it, though, or at least patch it well enough that it can work under nix. Either way, this will take some work.
I’d personally look for an alternative project entirely. This level of build system craziness coupled with an apparent insistence on using python2 is concerning, and all that for a tool that does remote desktop control via http. This has botnet fodder written all over it.
GNOME natively supports rdp today, which I’d recommend instead.