Repository navigation
Expand file tree
/
Copy pathco.hyprlab.Hylki.yml
More file actions
183 lines (180 loc) · 10.5 KB
/
Copy pathco.hyprlab.Hylki.yml
File metadata and controls
183 lines (180 loc) · 10.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# Flatpak manifest for Hylki — builds the self-hosted Flatpak distributed from
# hylki.hyprlab.co. (The GNOME runtime + SDK below come from the flathub *remote* — that
# is just where the org.gnome.Platform runtime is hosted; Hylki itself is not on
# Flathub.)
#
# Local test build (both tools are already installed):
# python3 flatpak-cargo-generator.py Cargo.lock -o cargo-sources.json
# flatpak install flathub org.gnome.Sdk//50 org.gnome.Platform//50 \
# org.freedesktop.Sdk.Extension.rust-stable//25.08
# flatpak-builder --user --install --force-clean build-dir co.hyprlab.Hylki.yml
# flatpak run co.hyprlab.Hylki
id: co.hyprlab.Hylki
runtime: org.gnome.Platform
runtime-version: '50'
sdk: org.gnome.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.rust-stable
command: hylki
# Keep the message catalogues in the app itself. By default flatpak-builder
# moves /app/share/locale into a .Locale extension of which Flatpak installs
# only the user's configured languages, so a language chosen in Settings
# (#179) had no catalogue unless it was also the system's (#183). The
# catalogues are small; the spell-check dictionaries are unaffected.
separate-locales: false
finish-args:
- --share=ipc
- --share=network # IMAP/SMTP, OAuth loopback, Gravatar
- --socket=wayland
- --socket=fallback-x11
- --device=dri # WebKit rendering
- --socket=pulseaudio # the new-mail sound (#292)
- --talk-name=org.freedesktop.secrets # keyring: passwords + OAuth tokens
- --talk-name=org.gnome.OnlineAccounts # import GNOME Online Accounts
- --talk-name=org.gnome.Settings # "Open Online Accounts" button
- --talk-name=org.gnome.evolution.dataserver.* # GNOME Contacts (Evolution Data Server)
- --talk-name=org.gnome.Contacts # "Open GNOME Contacts" button (D-Bus activation)
- --talk-name=org.kde.StatusNotifierWatcher # optional tray icon (#116); absent on plain GNOME
- --talk-name=com.canonical.Unity # notice Dash/Ubuntu Dock coming back, to resend the badge (#353); Flatpak has no --see-name
- --talk-name=org.gnome.Nautilus # "Restart Files" after installing the Files extension (#188)
- --talk-name=com.microsoft.identity.broker1 # Microsoft sign-in on a managed device, Conditional Access (#329)
# Deliberately NOT --talk-name=org.freedesktop.Flatpak: that permits
# `flatpak-spawn --host`, i.e. arbitrary command execution outside the
# sandbox, which would make every other restriction here advisory. The
# Contacts button reaches the host app by D-Bus-activating org.gnome.Contacts
# above; that is the path that actually runs.
# Read the host's Evolution Data Server address books (contacts list is read
# from these SQLite caches; the sandbox's own XDG dirs are empty).
# OpenPGP (#133): the runtime's gpg reads the user's keyring and talks to
# the host's gpg-agent (passphrases, pinentry) over its socket.
- --filesystem=~/.gnupg
- --filesystem=xdg-run/gnupg
- --filesystem=xdg-data/evolution:ro
- --filesystem=xdg-cache/evolution:ro
- --filesystem=xdg-config/evolution:ro
# Read the earlier names' sandbox data so accounts, settings and cached
# mail carry over on first start (Veem through 1.5.1, Vireo through
# 1.34.0); nothing there is written to. See src/legacy.rs.
- --filesystem=~/.var/app/co.hyprlab.Vireo:ro
- --filesystem=~/.var/app/com.getveem.Veem:ro
# The chosen app icon (Settings → App icon) is written over the app's icon
# name in the user's icon directory, which every desktop searches before the
# Flatpak export's — that is how the dock and app grid follow the choice.
- --filesystem=xdg-data/icons/hicolor:create
# …and the app's launcher is re-pointed at that icon through a per-user
# copy of its .desktop entry (the desktop caches app icons by name).
- --filesystem=xdg-data/applications:create
# The GNOME Files right-click extension (#188) is a Python file Nautilus
# loads on the host; Settings → System installs the bundled copy there.
- --filesystem=xdg-data/nautilus-python/extensions:create
# A file manager's "Send by email" (Nautilus, #90) hands the files over as
# attach= paths inside a mailto: URI. Flatpak's file forwarding only
# exports arguments that are themselves files, so those paths reach the
# sandbox as-is and the app has to be able to read them where they are:
# the home directory and removable drives, read-only. Everything the app
# writes goes through portals or the narrower entries above (a more
# specific entry wins over this one).
- --filesystem=home:ro
- --filesystem=/run/media:ro
- --filesystem=/media:ro
build-options:
append-path: /usr/lib/sdk/rust-stable/bin
env:
CARGO_HOME: /run/build/hylki/cargo
# No Google OAuth client is bundled — Google sign-in goes through GNOME Online
# Accounts (the account editor guides users there). Microsoft's client ID is
# built into the source and works out of the box.
modules:
# PDF attachment thumbnails (gallery + in-message drawer) render via
# poppler-glib, which the GNOME runtime doesn't ship — every other library it
# links against (cairo, glib, fontconfig, freetype, gdk-pixbuf) already is.
# Config lifted from flathub's org.gnome.Evince manifest, with
# ENABLE_LIBOPENJPEG turned off to avoid pulling in an openjpeg module too:
# thumbnails don't need JPEG2000 support, just the common image formats.
- name: popplerdata
no-autogen: true
make-install-args:
- prefix=/app
sources:
- type: archive
url: https://poppler.freedesktop.org/poppler-data-0.4.12.tar.gz
sha256: c835b640a40ce357e1b83666aabd95edffa24ddddd49b8daff63adb851cdab74
- name: poppler
buildsystem: cmake-ninja
config-opts:
- -DCMAKE_INSTALL_LIBDIR=/app/lib
- -DCMAKE_INSTALL_INCLUDEDIR=/app/include
- -DBUILD_GTK_TESTS=OFF
- -DBUILD_CPP_TESTS=OFF
- -DENABLE_CPP=OFF
- -DENABLE_BOOST=OFF
- -DENABLE_GOBJECT_INTROSPECTION=OFF
- -DENABLE_LIBOPENJPEG=OFF
- -DENABLE_QT5=OFF
- -DENABLE_QT6=OFF
cleanup:
- /bin
sources:
- type: archive
url: https://poppler.freedesktop.org/poppler-26.07.0.tar.xz
sha256: 304832f48f8a47fdca90c6b6d1f684e68f37c10c9a0726f345f4ca9df4ca01e2
# Spell-checking dictionaries beyond the runtime's English (#114): a modest
# set of common languages from LibreOffice's collection, installed under
# /app/share/hunspell where enchant (and so both the composer body's WebKit
# checker and the subject line's) finds them via XDG_DATA_DIRS. Renamed to
# canonical lang_REGION codes so enchant's tag lookup matches. Languages
# beyond these still come via the runtime locale extension
# (flatpak config --set extra-languages).
- name: hunspell-dictionaries
buildsystem: simple
build-commands:
- install -d /app/share/hunspell
- install -m644 de/de_DE_frami.dic /app/share/hunspell/de_DE.dic
- install -m644 de/de_DE_frami.aff /app/share/hunspell/de_DE.aff
- install -m644 es/es_ES.dic es/es_ES.aff /app/share/hunspell/
- install -m644 fr_FR/dictionaries/fr.dic /app/share/hunspell/fr_FR.dic
- install -m644 fr_FR/dictionaries/fr.aff /app/share/hunspell/fr_FR.aff
- install -m644 it_IT/it_IT.dic it_IT/it_IT.aff /app/share/hunspell/
- install -m644 nl_NL/nl_NL.dic nl_NL/nl_NL.aff /app/share/hunspell/
- install -m644 pl_PL/pl_PL.dic pl_PL/pl_PL.aff /app/share/hunspell/
- install -m644 pt_BR/pt_BR.dic pt_BR/pt_BR.aff /app/share/hunspell/
- install -m644 pt_PT/pt_PT.dic pt_PT/pt_PT.aff /app/share/hunspell/
- install -m644 ru_RU/ru_RU.dic ru_RU/ru_RU.aff /app/share/hunspell/
- install -m644 sv_SE/dictionaries/sv_SE.dic /app/share/hunspell/sv_SE.dic
- install -m644 sv_SE/dictionaries/sv_SE.aff /app/share/hunspell/sv_SE.aff
- install -m644 uk_UA/uk_UA.dic uk_UA/uk_UA.aff /app/share/hunspell/
sources:
- type: archive
url: https://github.com/LibreOffice/dictionaries/archive/32b006a2c22a4ac7e8ed3f03346f7b3d85a970a4.tar.gz
sha256: cbd790eca560de5e8ec8bd64117a00dfd0bc06b091c8f52d23e44ea00d3e8461
- name: hylki
buildsystem: simple
build-commands:
- cargo --offline fetch --manifest-path Cargo.toml --verbose
- cargo --offline build --release --verbose
- install -Dm755 target/release/hylki /app/bin/hylki
# Translations: each po/<lang>.po becomes a message catalogue under
# /app/share/locale (kept in the app: separate-locales above),
# and the launcher and metainfo get their translated fields merged in
# (see po/README.md).
- for po in po/*.po; do [ -e "$po" ] || continue; lang=$(basename "$po" .po); install -d /app/share/locale/$lang/LC_MESSAGES; msgfmt -o /app/share/locale/$lang/LC_MESSAGES/hylki.mo "$po"; done
- install -d /app/share/applications && msgfmt --desktop --template=data/co.hyprlab.Hylki.desktop -d po -o /app/share/applications/co.hyprlab.Hylki.desktop
- install -Dm644 data/icons/hicolor/256x256/apps/co.hyprlab.Hylki.png /app/share/icons/hicolor/256x256/apps/co.hyprlab.Hylki.png
- install -Dm644 data/icons/hicolor/512x512/apps/co.hyprlab.Hylki.png /app/share/icons/hicolor/512x512/apps/co.hyprlab.Hylki.png
- install -Dm644 data/icons/hicolor/scalable/apps/co.hyprlab.Hylki.svg /app/share/icons/hicolor/scalable/apps/co.hyprlab.Hylki.svg
- install -Dm644 data/icons/hicolor/symbolic/apps/co.hyprlab.Hylki-symbolic.svg /app/share/icons/hicolor/symbolic/apps/co.hyprlab.Hylki-symbolic.svg
# The restart helper's D-Bus service (Settings → App icon → Restart Now):
# exported by Flatpak, so the bus can start a fresh sandbox instance.
- install -Dm644 data/co.hyprlab.Hylki.Restart.service /app/share/dbus-1/services/co.hyprlab.Hylki.Restart.service
# WebKit's fonts for a host whose own fonts hang it (#296): used only
# once a probe page has shown the fallback is what loads.
- install -Dm644 data/fontconfig/fallback.conf /app/share/hylki/fontconfig/fallback.conf
- install -d /app/share/metainfo && msgfmt --xml --template=data/co.hyprlab.Hylki.metainfo.xml -d po -o /app/share/metainfo/co.hyprlab.Hylki.metainfo.xml
sources:
- type: git
url: https://github.com/hyprlab/hylki.git
tag: v1.47.1
commit: 3e4044407543f12792f39372b0f8f92ffd066e84
# Vendored crate sources for the offline Flatpak build. Generate with:
# flatpak-cargo-generator.py Cargo.lock -o cargo-sources.json
- cargo-sources.json