How can i extend the sdk runtime during a flatpak build?

I want to build a flatpak from a cmake based project.

The first fatal problem i encountered is that cmake calls into ruby and requires a special gem installed to generate some important data files. The gem is nokogiri, a xml parser. But i can’t use the package manager because there is no internet access in the Sdk.

I also expect more problems because this is a wrapping a c library so it needs to compile in the Sdk itself.

What is the best way to do in this situation? I’m using “org.gnome.Sdk/x86_64/42” as runtime

You need to add the other things as modules and do a cleanup after build