FEAT(packaging): Flatpak support - #132
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #132 +/- ##
==========================================
+ Coverage 73.97% 73.98% +0.01%
==========================================
Files 69 69
Lines 29154 29157 +3
==========================================
+ Hits 21567 21573 +6
+ Misses 7587 7584 -3
🚀 New features to boost your workflow:
|
| build-options: | ||
| append-path: /usr/lib/sdk/rust-stable/bin | ||
| env: | ||
| CARGO_HOME: /run/build/hydra/cargo |
There was a problem hiding this comment.
build has no network and no offline sources. For the local make flatpak path add the build-arg; for the Flathub submission generate cargo-sources.json instead (never both — Flathub rejects --share=network):
build-options:
append-path: /usr/lib/sdk/rust-stable/bin
build-args:
- --share=network
env:
CARGO_HOME: /run/build/hydra/cargo
| - --filesystem=home | ||
| # StatusNotifierItem system tray integration | ||
| - --talk-name=org.kde.StatusNotifierWatcher | ||
| - --own-name=org.kde.StatusNotifierItem-* |
There was a problem hiding this comment.
delete the line. --own-name=org.kde.StatusNotifierItem-* isn't a valid bus name (flatpak only strips a trailing .*), so build-finish errors out. ksni registers with the watcher under its unique name, so line 22's --talk-name=org.kde.StatusNotifierWatcher is all that's needed.
| Terminal=false | ||
| Categories=Network;FileTransfer; | ||
| Keywords=download;manager;accelerator;torrent;http;metalink;hls;dash; | ||
| StartupWMClass=hydra |
There was a problem hiding this comment.
StartupWMClass=io.github.ja7ad.hydra, to match the app id app.rs:1789 now sets.
| Name=Hydra Download Manager | ||
| GenericName=Download Manager | ||
| Comment=Multi-connection download accelerator and manager | ||
| Exec=hydra-gui @@u %u @@ |
There was a problem hiding this comment.
either drop both lines (Exec=hydra-gui, no MimeType), matching packaging/debian/hydra.desktop, or teach main.rs to consume a positional URL. As written the entry claims the hydra: scheme and throws the argument away.
| @@ -1786,7 +1786,7 @@ impl App { | |||
| // hydra.desktop (scripts/package-linux.sh, install.sh). | |||
There was a problem hiding this comment.
the comment "Must stay equal to the basename of hydra.desktop (scripts/package-linux.sh, install.sh)" is now only half true; add the Flatpak entry to the list it names.
| - install -Dm644 README.md /app/share/doc/io.github.ja7ad.hydra/README.md | ||
| - install -Dm644 CHANGELOG.md /app/share/doc/io.github.ja7ad.hydra/CHANGELOG.md | ||
| sources: | ||
| - type: dir |
There was a problem hiding this comment.
add skip: [target, .git, build-dir, repo] under the type: dir source.
| <binary>hydra-host</binary> | ||
| </provides> | ||
| <releases> | ||
| <release version="0.4.2" date="2026-09-01"> |
There was a problem hiding this comment.
date="2026-09-05" per CHANGELOG.md:8, and move the "Flatpak packaging" bullet (:65) to whichever release actually ships it.
| appimage: require-linux | ||
| scripts/package-appimage.sh $(ARGS) | ||
|
|
||
| # Flatpak build, metadata validation, or bundle generation: |
There was a problem hiding this comment.
the header at line 10 promises target/dist/*.flatpak, but bare make flatpak builds without exporting a bundle; either say make flatpak ARGS=--bundle there or default BUNDLE=1 in the script.
|
crates/hydra-gui/src/main.rs:101 (root cause of the /app/bin/hydra-host manifests installed by .yml:49) — skip host registration inside the sandbox, since nmhost.rs:44 resolves a path only valid inside it: Otherwise a Flatpak launch overwrites the host's working /usr/bin/hydra-host manifest. (Either that, or drop hydra-host from the manifest and document that browser integration needs the native package.) |
No description provided.