Flatpak: Difference between revisions
imported from old wiki |
→Development: Update outdated example |
||
| Line 55: | Line 55: | ||
=== Build a Flatpak project === | === Build a Flatpak project === | ||
The following example builds a demo | The following example builds a demo app of the [https://github.com/GNOME/libadwaita libadwaita] repository using <code>flatpak-builder</code>, installs it locally in the user space and runs it. First install <code>flatpak</code> and <code>flatpak-builder</code> on your system | ||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | {{file|/etc/nixos/configuration.nix|nix|<nowiki> | ||
| Line 62: | Line 62: | ||
</nowiki>}} | </nowiki>}} | ||
Clone, build and run the example project | Clone, build and run the example project. | ||
< | <syntaxhighlight lang="console"> | ||
$ flatpak remote-add --if-not-exists gnome-nightly https://nightly.gnome.org/gnome-nightly.flatpakrepo | $ flatpak remote-add --if-not-exists gnome-nightly https://nightly.gnome.org/gnome-nightly.flatpakrepo | ||
$ flatpak install org.gnome.Sdk | $ flatpak install gnome-nightly org.gnome.Sdk org.gnome.Platform | ||
$ git clone https://gitlab.gnome.org/GNOME/ | $ git clone https://gitlab.gnome.org/GNOME/libadwaita.git | ||
$ cd | $ cd libadwaita | ||
$ flatpak-builder --user --install | $ nix shell nixpkgs#appstream | ||
$ flatpak run | $ flatpak-builder --disable-tests --user --install build demo/org.gnome.Adwaita1.Demo.json | ||
</ | $ flatpak run org.gnome.Adwaita1.Demo.json | ||
</syntaxhighlight> | |||
Note that the <code>gnome-nightly</code> repository and | Note that the <code>gnome-nightly</code> repository and the <code>appstream</code> dependency are especially required for this specific project and might be different for other Flatpak projects. | ||
== Tips and tricks == | == Tips and tricks == | ||