One interesting usecase of flatpak is as a compliment to the ideas of Fedora Atomic Workstation and similar projects. In other words, a read-only core image for the base operating system, and then using various types of containers and sandboxes for the applications on top of that.
One problem in such a setup is doing development, in that the basic core rarely contains development tools. This is helped a bit by flatpak using runtimes and SDKs, because the compiler used during the build is not from the host. However, flatpaks are typically built using flatpak-builder, which still has some dependencies on the host, such as git/bzr/svn and strip. These pull in a lot of packages that you don’t want on a minimal core OS image.
So, how do we solve this?
We must go deeper!
Introducing org.flatpak.Builder, a flatpak:ed version of flatpak-builder, which only needs flatpak to be installed on the system, thus making it possible to build apps on systems with zero development tools:
$ flatpak install flathub org.flatpak.Builder ... $ flatpak run org.flatpak.Builder build-dir org.flatpak.Builder.json ...
Additionally, with recent versions of flatpak, if you add /var/lib/flatpak/exports/bin
to PATH
you can use the shorter:
$ org.flatpak.Builder build-dir org.flatpak.Builder.json
The future is one step closer!
So Flatpak targets cli applications in addition to desktop applications now?
Targets is a strong word. It works, as it always did, and we do now export binary wrappers that makes it somewhat more ergonomic to use on the CLI.
But, it is still not really the focus for flatpak.