-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdev.zed.Zed.yaml
128 lines (119 loc) · 5.05 KB
/
dev.zed.Zed.yaml
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
# dev.zed.Zed.yaml
app-id: dev.zed.Zed
runtime: org.freedesktop.Sdk
runtime-version: '24.08'
sdk: org.freedesktop.Sdk
command: zed-wrapper
separate-locales: false
finish-args:
- --device=dri
- --filesystem=home
- --share=ipc
- --share=network
- --socket=fallback-x11
- --socket=pulseaudio
- --socket=wayland
# Enable access to Flatpak host commands (Needs linter exception: https://docs.flathub.org/docs/for-app-authors/linter#exceptions)
- --talk-name=org.freedesktop.Flatpak
# Enable access to Freedesktop Secret Service & related auth services since Zed uses Git heavily
- --talk-name=org.freedesktop.secrets
- --talk-name=org.kde.kwalletd6
- --socket=ssh-auth
- --socket=gpg-agent
- --talk-name=org.gnome.keyring.SystemPrompter
modules:
- shared-modules/libsecret/libsecret.json
- name: gcr
buildsystem: meson
cleanup:
- /include
- /lib/debug
- /lib/girepository-1.0
- /lib/pkgconfig
- /man
- /share/gir-1.0
- /share/doc
- /share/gtk-doc
- /share/info
- /share/man
- /share/pkgconfig
- '*.a'
- '*.la'
config-opts:
- -Dgtk_doc=false
- -Dintrospection=false
sources:
- type: archive
sha256: bad10f3c553a0e1854649ab59c5b2434da22ca1a54ae6138f1f53961567e1ab7
url: https://download.gnome.org/sources/gcr/3.41/gcr-3.41.2.tar.xz
- name: zed
buildsystem: simple
build-commands:
- install -Dm 755 bin/* --target-directory ${FLATPAK_DEST}/bin
- install -Dm 755 lib/* --target-directory ${FLATPAK_DEST}/lib
- install -Dm 755 libexec/* --target-directory ${FLATPAK_DEST}/libexec
- install -Dm 644 share/applications/* --target-directory ${FLATPAK_DEST}/share/applications
- install -Dm 644 ${FLATPAK_ID}.metainfo.xml --target-directory ${FLATPAK_DEST}/share/metainfo
- install -Dm 644 share/icons/hicolor/512x512/apps/zed.png --target-directory ${FLATPAK_DEST}/share/icons/hicolor/512x512/apps
# Rename instances of `zed` to `${FLATPAK_ID}`
- rename zed ${FLATPAK_ID} ${FLATPAK_DEST}/share/{applications/*,icons/hicolor/*/apps/*}
# Ensure `desktop-file-edit` validates; Enforce `[Desktop Action NewWorkspace]` has a matching action
- |
if ! grep -q "^Actions=NewWorkspace" "${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop"; then
# Find the line number where [Desktop Action NewWorkspace] is located
line_num=$(grep -n "^\[Desktop Action NewWorkspace\]" "${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop" | cut -d: -f1)
if [ -n "$line_num" ]; then
# Insert Actions=NewWorkspace above the line where [Desktop Action NewWorkspace] is located
sed -i "${line_num}i Actions=NewWorkspace" "${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop"
else
# If [Desktop Action NewWorkspace] doesn't exist, add Actions=NewWorkspace at the end
echo "Actions=NewWorkspace" >> "${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop"
fi
fi
# Ensure zed-wrapper is used as the Exec command in the `.desktop` file
- desktop-file-edit --set-key="Exec" --set-value="zed-wrapper %U" ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop
# Modify original `.desktop` file to use the correct icon name
- desktop-file-edit --set-icon="${FLATPAK_ID}" ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop
sources:
- type: archive
url: https://github.com/zed-industries/zed/releases/download/v0.170.2/zed-linux-x86_64.tar.gz
sha256: 841638c742d578aefd398cb440e1962677342faf1dff2c496ba4b8a963727cb6
only-arches:
- x86_64
x-checker-data:
type: json
url: https://api.github.com/repos/zed-industries/zed/releases/latest
version-query: .tag_name
url-query: .assets[] | select(.name=="zed-linux-x86_64.tar.gz") | .browser_download_url
is-main-source: true
- type: archive
url: https://github.com/zed-industries/zed/releases/download/v0.170.2/zed-linux-aarch64.tar.gz
sha256: 65f8a9e0fc5cd0ea9b3f76df33284cc54aea9bf9e5a62f0f6b3e6288f02b399d
only-arches:
- aarch64
x-checker-data:
type: json
url: https://api.github.com/repos/zed-industries/zed/releases/latest
version-query: .tag_name
url-query: .assets[] | select(.name=="zed-linux-aarch64.tar.gz") | .browser_download_url
is-main-source: true
- type: file
path: dev.zed.Zed.metainfo.xml
- name: zed-wrapper
buildsystem: meson
config-opts:
- -Deditor_binary=/app/bin/zed
- -Deditor_title=Zed
- -Dprogram_name=zed-wrapper
- -Dfirst_run_template=README.md
- -Dsdk_update_template=sdk_update.md
- -Dflagfile_prefix=flatpak-zed
- -Ddefault_loglevel=0
sources:
- type: git
commit: 3314b55ccd4ece8810715787e246f8407e20caab
url: https://github.com/flathub-infra/ide-flatpak-wrapper
- type: file
path: README.md
- type: file
path: sdk_update.md