Skip to content

Develop an App with a Flatpak Manifest

This workflow is used for developing or testing changes to an app with a Flatpak manifest using flatpak-builder.

Setup

Create a local user-level remote named “flathub-apps-built-locally” to hold your built-from-source Flatpak apps:

flatpak remote-add --user --if-not-exists flathub-apps-built-locally https://flathub.org/repo/flathub.flatpakrepo

Make changes to just the app

First check out the source code for the app you’d like to build. For example, KDE’s Filelight disk space analyzer app:

# Create folder to hold KDE source code. Skippable if it already exists
mkdir -p ~/kde/src/

# Go into that folder
cd ~/kde/src/

# Download source code for Filelight
git clone git@invent.kde.org:utilities/filelight.git

# Go into Filelight’s source code folder
cd ~/kde/src/filelight

# Build Filelight as a flatpak
flatpak-builder build --user --install-deps-from=flathub-apps-built-locally --force-clean --ccache --install .flatpak-manifest.json

flatpak-builder will create a Flatpak repo named filelight-origin and export the freshly built Filelight Flatpak to this repo.

Now run it:

org.kde.filelight

Further information


Article contributed by under the CC-BY-4.0 license.