Skip to content

Commit 0c97fe1

Browse files
Add Flatpak packaging configuration for Flathub distribution (#2018)
- Add Flatpak manifest (com.hyprnote.Hyprnote.yml) with GNOME runtime - Add desktop file (com.hyprnote.Hyprnote.desktop) for application menu - Add AppStream metainfo (com.hyprnote.Hyprnote.metainfo.xml) for Flathub - Add tauri.conf.flatpak.json to disable updater for Flatpak builds - Add FLATPAK.md documentation for building and Flathub submission Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent efdce56 commit 0c97fe1

File tree

5 files changed

+449
-0
lines changed

5 files changed

+449
-0
lines changed

apps/desktop/FLATPAK.md

Lines changed: 220 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,220 @@
1+
# Flatpak Packaging for Hyprnote
2+
3+
This document describes how to build Hyprnote as a Flatpak and submit it to Flathub.
4+
5+
## Overview
6+
7+
Hyprnote uses the "build from source" strategy for Flatpak packaging, which is the preferred approach for Flathub. This means the entire application is built inside the Flatpak sandbox using vendored dependencies.
8+
9+
## Prerequisites
10+
11+
Install the required tools:
12+
13+
```bash
14+
# Install Flatpak and flatpak-builder
15+
sudo apt install flatpak flatpak-builder
16+
17+
# Add Flathub repository
18+
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
19+
20+
# Install GNOME runtime and SDK
21+
flatpak install flathub org.gnome.Platform//47 org.gnome.Sdk//47
22+
23+
# Install SDK extensions for Rust and Node
24+
flatpak install flathub org.freedesktop.Sdk.Extension.rust-stable//24.08
25+
flatpak install flathub org.freedesktop.Sdk.Extension.node22//24.08
26+
```
27+
28+
Install the flatpak-builder-tools for generating vendored dependencies:
29+
30+
```bash
31+
# Clone flatpak-builder-tools
32+
git clone https://github.com/nickvidal/flatpak-builder-tools.git
33+
34+
# For Node/pnpm dependencies
35+
pip install aiohttp toml
36+
37+
# For Cargo dependencies
38+
pip install toml
39+
```
40+
41+
## Generating Vendored Dependencies
42+
43+
Before building the Flatpak, you need to generate JSON files containing all vendored dependencies. These files allow the build to proceed offline, which is required by Flathub.
44+
45+
### Generate pnpm dependencies
46+
47+
From the repository root:
48+
49+
```bash
50+
# Generate pnpm-sources.json
51+
python3 flatpak-builder-tools/node/flatpak-node-generator.py pnpm \
52+
-o apps/desktop/flatpak/pnpm-sources.json \
53+
pnpm-lock.yaml
54+
```
55+
56+
### Generate Cargo dependencies
57+
58+
From the repository root:
59+
60+
```bash
61+
# Generate cargo-sources.json
62+
python3 flatpak-builder-tools/cargo/flatpak-cargo-generator.py \
63+
-d Cargo.lock \
64+
-o apps/desktop/flatpak/cargo-sources.json
65+
```
66+
67+
## Building Locally
68+
69+
Once the vendored dependency files are generated, you can build the Flatpak locally:
70+
71+
```bash
72+
# Build and install to user Flatpak
73+
flatpak-builder --user --install --force-clean \
74+
flatpak-build-dir \
75+
apps/desktop/flatpak/com.hyprnote.Hyprnote.yml
76+
```
77+
78+
## Running the Flatpak
79+
80+
After building and installing:
81+
82+
```bash
83+
flatpak run com.hyprnote.Hyprnote
84+
```
85+
86+
## Debugging
87+
88+
To debug inside the Flatpak sandbox:
89+
90+
```bash
91+
# Open a shell inside the sandbox
92+
flatpak run --devel --command=sh com.hyprnote.Hyprnote
93+
94+
# Inside the sandbox, you can inspect /app and run the binary directly
95+
ls /app/bin/
96+
/app/bin/hyprnote
97+
```
98+
99+
## Flathub Submission
100+
101+
### Preparation Checklist
102+
103+
Before submitting to Flathub, ensure:
104+
105+
- [ ] The manifest builds successfully with `flatpak-builder`
106+
- [ ] The app runs correctly via `flatpak run com.hyprnote.Hyprnote`
107+
- [ ] All vendored dependencies are up to date
108+
- [ ] The metainfo.xml file has valid screenshots and descriptions
109+
- [ ] The desktop file has correct categories and keywords
110+
111+
### Submission Process
112+
113+
1. Fork the `flathub/flathub` repository on GitHub
114+
115+
2. Clone your fork and checkout the `new-pr` branch:
116+
```bash
117+
git clone --branch=new-pr [email protected]:YOUR_USERNAME/flathub.git
118+
cd flathub
119+
```
120+
121+
3. Create a new branch for your app:
122+
```bash
123+
git checkout -b com.hyprnote.Hyprnote
124+
```
125+
126+
4. Create the app directory and copy files:
127+
```bash
128+
mkdir com.hyprnote.Hyprnote
129+
cp /path/to/hyprnote/apps/desktop/flatpak/com.hyprnote.Hyprnote.yml com.hyprnote.Hyprnote/
130+
cp /path/to/hyprnote/apps/desktop/flatpak/com.hyprnote.Hyprnote.desktop com.hyprnote.Hyprnote/
131+
cp /path/to/hyprnote/apps/desktop/flatpak/com.hyprnote.Hyprnote.metainfo.xml com.hyprnote.Hyprnote/
132+
cp /path/to/hyprnote/apps/desktop/flatpak/pnpm-sources.json com.hyprnote.Hyprnote/
133+
cp /path/to/hyprnote/apps/desktop/flatpak/cargo-sources.json com.hyprnote.Hyprnote/
134+
```
135+
136+
5. Update the manifest to use a git source instead of a local directory:
137+
```yaml
138+
sources:
139+
- type: git
140+
url: https://github.com/fastrepl/hyprnote.git
141+
tag: desktop_vX.Y.Z # Use the release tag
142+
commit: abc123... # Include the commit hash
143+
```
144+
145+
6. Commit and push:
146+
```bash
147+
git add .
148+
git commit -m "Add com.hyprnote.Hyprnote"
149+
git push origin com.hyprnote.Hyprnote
150+
```
151+
152+
7. Open a pull request from your branch to the `new-pr` branch of `flathub/flathub`
153+
154+
8. Respond to review comments from Flathub maintainers
155+
156+
### After Approval
157+
158+
Once approved:
159+
- Flathub creates a dedicated repository: `flathub/com.hyprnote.Hyprnote`
160+
- You are invited as a maintainer
161+
- Future updates are done by pushing to that repository
162+
163+
## Updating the Flatpak
164+
165+
When releasing a new version:
166+
167+
1. Update the version in `com.hyprnote.Hyprnote.metainfo.xml`
168+
2. Regenerate vendored dependencies if dependencies changed
169+
3. Update the git source tag/commit in the Flathub manifest
170+
4. Push changes to the Flathub app repository
171+
172+
## File Structure
173+
174+
```
175+
apps/desktop/
176+
flatpak/
177+
com.hyprnote.Hyprnote.yml # Flatpak manifest
178+
com.hyprnote.Hyprnote.desktop # Desktop entry file
179+
com.hyprnote.Hyprnote.metainfo.xml # AppStream metadata
180+
pnpm-sources.json # Vendored pnpm dependencies (generated)
181+
cargo-sources.json # Vendored Cargo dependencies (generated)
182+
src-tauri/
183+
tauri.conf.flatpak.json # Tauri config for Flatpak (updater disabled)
184+
```
185+
186+
## Permissions
187+
188+
The Flatpak manifest includes the following permissions:
189+
190+
- **Display**: Wayland and X11 fallback for GUI
191+
- **Audio**: PulseAudio for microphone and speaker capture
192+
- **Network**: For cloud AI services and calendar sync
193+
- **Notifications**: For meeting reminders and alerts
194+
- **System Tray**: For background operation indicator
195+
- **Filesystem**: Access to Documents and Downloads folders
196+
197+
## Troubleshooting
198+
199+
### Build fails with missing dependencies
200+
201+
Regenerate the vendored dependency files:
202+
```bash
203+
python3 flatpak-builder-tools/node/flatpak-node-generator.py pnpm -o apps/desktop/flatpak/pnpm-sources.json pnpm-lock.yaml
204+
python3 flatpak-builder-tools/cargo/flatpak-cargo-generator.py -d Cargo.lock -o apps/desktop/flatpak/cargo-sources.json
205+
```
206+
207+
### Audio not working
208+
209+
Ensure PulseAudio is running on your system. The Flatpak uses `--socket=pulseaudio` for audio access.
210+
211+
### System tray icon not showing
212+
213+
Some desktop environments require additional configuration for StatusNotifier support. The manifest includes `--talk-name=org.kde.StatusNotifierWatcher` for tray icon support.
214+
215+
## References
216+
217+
- [Tauri Flatpak Documentation](https://v2.tauri.app/distribute/flatpak/)
218+
- [Flathub Documentation](https://docs.flathub.org/)
219+
- [Flatpak Builder Tools](https://github.com/nickvidal/flatpak-builder-tools)
220+
- [AppStream Metainfo Guidelines](https://docs.flathub.org/docs/for-app-authors/metainfo-guidelines/)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[Desktop Entry]
2+
Name=Hyprnote
3+
GenericName=AI Meeting Notes
4+
Comment=The AI notepad for private meetings
5+
Exec=hyprnote %U
6+
Icon=com.hyprnote.Hyprnote
7+
Terminal=false
8+
Type=Application
9+
Categories=Office;AudioVideo;Recorder;
10+
Keywords=notes;meeting;transcription;ai;audio;recording;
11+
StartupNotify=true
12+
StartupWMClass=hyprnote
13+
MimeType=x-scheme-handler/hypr;
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<component type="desktop-application">
3+
<id>com.hyprnote.Hyprnote</id>
4+
5+
<name>Hyprnote</name>
6+
<summary>The AI notepad for private meetings</summary>
7+
8+
<metadata_license>CC0-1.0</metadata_license>
9+
<project_license>MIT</project_license>
10+
11+
<description>
12+
<p>
13+
Hyprnote is an AI notetaking app specifically designed to take meeting notes.
14+
With Hyprnote, you can transcribe all kinds of meetings whether it be online or offline.
15+
</p>
16+
<p>Features:</p>
17+
<ul>
18+
<li>Listens to your meetings so you can only jot down important stuff</li>
19+
<li>No bots joining your meetings - Hyprnote listens directly to sounds coming in and out of your computer</li>
20+
<li>Crafts perfect summaries based on your memos, right after the meeting is over</li>
21+
<li>Run completely offline by using LM Studio or Ollama</li>
22+
<li>Bring your own LLM - use local models via Ollama or third-party APIs like Gemini, Claude, or Azure-hosted GPT</li>
23+
<li>Note templates - choose from predefined templates or create your own</li>
24+
<li>AI Chat - ask follow-ups right inside your notes</li>
25+
</ul>
26+
</description>
27+
28+
<launchable type="desktop-id">com.hyprnote.Hyprnote.desktop</launchable>
29+
30+
<url type="homepage">https://hyprnote.com</url>
31+
<url type="bugtracker">https://github.com/fastrepl/hyprnote/issues</url>
32+
<url type="vcs-browser">https://github.com/fastrepl/hyprnote</url>
33+
<url type="contribute">https://github.com/fastrepl/hyprnote/blob/main/CONTRIBUTING.md</url>
34+
35+
<developer id="com.hyprnote">
36+
<name>Fastrepl</name>
37+
</developer>
38+
39+
<branding>
40+
<color type="primary" scheme_preference="light">#f5f5f5</color>
41+
<color type="primary" scheme_preference="dark">#1a1a1a</color>
42+
</branding>
43+
44+
<content_rating type="oars-1.1" />
45+
46+
<supports>
47+
<control>pointing</control>
48+
<control>keyboard</control>
49+
</supports>
50+
51+
<requires>
52+
<display_length compare="ge">768</display_length>
53+
</requires>
54+
55+
<categories>
56+
<category>Office</category>
57+
<category>AudioVideo</category>
58+
<category>Recorder</category>
59+
</categories>
60+
61+
<keywords>
62+
<keyword>notes</keyword>
63+
<keyword>meeting</keyword>
64+
<keyword>transcription</keyword>
65+
<keyword>ai</keyword>
66+
<keyword>audio</keyword>
67+
<keyword>recording</keyword>
68+
<keyword>speech-to-text</keyword>
69+
</keywords>
70+
71+
<screenshots>
72+
<screenshot type="default">
73+
<caption>Notepad view for taking notes during meetings</caption>
74+
<image>https://github.com/user-attachments/assets/268ab859-a194-484b-b895-bc640df18dd4</image>
75+
</screenshot>
76+
<screenshot>
77+
<caption>Real-time transcript while you stay engaged in the conversation</caption>
78+
<image>https://github.com/user-attachments/assets/e63ce73f-1a5f-49ce-a14d-dd8ba161e5bc</image>
79+
</screenshot>
80+
<screenshot>
81+
<caption>Bring your own LLM - use local models or third-party APIs</caption>
82+
<image>https://github.com/user-attachments/assets/a6552c99-acbc-4d47-9d21-7f1925989344</image>
83+
</screenshot>
84+
<screenshot>
85+
<caption>AI Chat - ask follow-ups right inside your notes</caption>
86+
<image>https://github.com/user-attachments/assets/52b7dc14-906f-445f-91f9-b0089d40a495</image>
87+
</screenshot>
88+
</screenshots>
89+
90+
<releases>
91+
<release version="0.1.0" date="2025-01-01">
92+
<description>
93+
<p>Initial Flatpak release</p>
94+
</description>
95+
</release>
96+
</releases>
97+
</component>

0 commit comments

Comments
 (0)