Any project successfully bundle NetworkManager?

I am writing a Python+GTK app, which call NetworkManager API vi Gir. For Debian package, I can simply declare gir1.2-nm-1.0 as dependency. But to package as Flatpak, I have to include NetworkManager and build from source. It is difficult, so please someone give me an example project, which successfully bundle NetworkManager, so I can learn.

I found this: