Note: Fedora Atomic Workstation has recently been renamed to Team Silverblue. Learn more here.
Of course, it works well to build desktop apps that already have a flatpak manifest in their git tree. But I have also used it successfully to build and run anything from a library to a session service.
For this reason, I suggested that we should add it to the default Fedora Workstation installation – it is a nice tool to have around. When the Workstation SIG discussed this idea, it was rightly pointed out that there are quite a few dependencies that flatpak-builder pulls in: git, bzr, svn, meson, autotools, … Not surprising for a meta-build-tool that supports diverse source control and build systems. But it does make the default install quite a bit heavier.
Maybe some of this can be fixed by turning ‘fringe’ dependencies like svn or bzr into Recommends and make flatpak-builder handle the lack these tools gracefully. But there’s an easier solution here: Just use flatpak! It may not be the premier use case it is designed for, but flatpak can handle commandline apps just fine.
So we created a flatpak for flatpak-builder today, and made it available on flathub. You can get it with:
flatpak install flathub org.flatpak.Builder
As I’ve explained in an earlier post, you can get the familiar command name back by setting up a shell alias:
PATH=$PATH:$HOME/.local/share/flatpak/bin alias flatpak-builder=org.flatpak.Builder
And, voilá, flatpak-builder works as before! And all its dependencies are in the runtime that it uses (in this case, an SDK). My host system can stay lean and clean, as I like it.
At first I was surprised by this use of flatpak, but then I learned that there are already a few non-graphical applications on flathub. For example, you can install glxinfo from there (under the name org.freedesktop.GlxInfo), and vim is also available on flathub.
I suspect that we might see more commandline tools become available in this form in the future.