packaging: Added the snap package

This commit adds the snap packaging reciepe to the repo, which can
served to the store directly from this repo.
This commit is contained in:
Soumyadeep Ghosh 2024-08-27 21:01:25 +05:30
parent 97708fdf43
commit 11bf6ab93d
No known key found for this signature in database
GPG key ID: C3B02EF6A5ED7B51
2 changed files with 87 additions and 0 deletions

17
snap/gui/zed.desktop Normal file
View file

@ -0,0 +1,17 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=Zed
GenericName=Text Editor
Comment=A high-performance, multiplayer code editor.
StartupNotify=true
Exec=zed-editor %U
Icon=${SNAP}/meta/gui/icon.png
Categories=Utility;TextEditor;Development;IDE;
Keywords=zed;zed-editor
MimeType=text/plain;application/x-zerosize;inode/directory;x-scheme-handler/zed;
Actions=NewWorkspace;
[Desktop Action NewWorkspace]
Exec=zed-editor --new %U
Name=Open a new workspace

70
snap/snapcraft.yaml Normal file
View file

@ -0,0 +1,70 @@
name: zed-editor
title: Zed
base: core24
version: '0.149.5'
summary: Code at the speed of thought
description: |
Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter. It's also open source.
grade: stable
confinement: classic
icon: crates/zed/resources/app-icon.png
website: https://zed.dev/
souce-code: https://github.com/zed-industries/zed
issues: https://github.com/zed-industries/zed/issues
contact:
- https://zed.dev/docs/feedback-and-support
- https://zed.dev/faq
- https://zed.dev/docs/getting-started
parts:
zed:
plugin: rust
source: https://github.com/zed-industries/zed.git
source-tag: 'v$SNAPCRAFT_PROJECT_VERSION'
source-depth: 1
build-environment:
- CC: clang
- ZED_UPDATE_EXPLANATION: "Updates are handled by Snap."
- RELEASE_VERSION: "$SNAPCRAFT_PROJECT_VERSION"
build-packages:
- clang
- cmake
- libasound2-dev
- libssl-dev
- libvulkan-dev
- libxcb1-dev
- libxkbcommon-dev
- libxkbcommon-x11-dev
- libzstd-dev
- mold
build-attributes:
- enable-patchelf
deps:
plugin: nil
stage-packages:
- libasound2t64
- libssl3t64
- libvulkan1
- libwayland-client0
- libwayland-egl1
- libwayland-cursor0
- libxcb1
- libxkbcommon0
- libxkbcommon-x11-0
- libzstd1
- sqlite3
build-attributes:
- enable-patchelf
prime:
- -etc
- -usr/share/doc
- -usr/share/lintian
- -usr/share/man
apps:
zed-editor:
command: zed
common-id: dev.zed.Zed