This repository contains the manifests and scripts used for building and packaging Lapce for Flathub.
The scripts make use of cargo/flatpak-cargo-generator.py from flatpak-builder-tools and a modified update.py from flathub/net.veloren.veloren.
Running a code editor sandboxed can be tricky. Linters and other plugins often need access to source files normally not accessible by the flatpak sandbox. Therefore this flatpak sets the following permissions by default:
filesystem=host: The whole host filesystem is accessible by Lapce (to work arround issues like this).talk-name=org.freedesktop.Flatpak: Allows the use of flatpak-spawn --host.
The Lapce developers provide nightly builds for testing. These can be downloaded via their releases page.
Flathub is only meant for distributing stable releases, so nightly flatpaks won't be provided. If you want to build a flatpak from the latest upstream commit, follow these simple steps:
# create a new branch
git checkout -b bleeding-edge
# update the manifests to match the latest upstream commit
python update.py lapce-git.json
# build and install the flatpak
flatpak-builder --user --install --force-clean build dev.lapce.lapce.yamlSimilar to the instructions above, you can build from a different repository or branch for testing:
- create a new branch:
git checkout -b test-feature-x - edit
lapce-git.jsonto point to the desired repository/branch:
{
"type": "git",
"url": "https://github.com/user-name/lapce",
"branch": "branch-name"
}git add lapce-git.json && git commit -m "Use custom repository"- update the manifests to match the latest commit:
python update.py lapce-git.json. Run this command again, every time the remote repository changes. - build and install the flatpak:
flatpak-builder --user --install --force-clean build dev.lapce.lapce.yaml