Τhere is already a moonlight addon for LibreElec. The problem is that it doesnt work with latest GFE (as we speak GFE: 3.13.1.30) but either in version 3.12.0.84. But it works as expected in previous GFE versions (i dont remember the exact version but i think 3.9.0.97 should do the trick - as long as you don't care about GFE updates).
I know there already is an addon for LibreElec but it is an old version....Rolling back on GFE will not work for me because I do keep it constantly updated. I just want to manually compile the latest version of the addon and test it on LibreElec, however I am having a hard time finding any info related on how to do this...