-
Notifications
You must be signed in to change notification settings - Fork 304
user/gram: new package #5506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
user/gram: new package #5506
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| From fc8fa92dad36327fe1b98b475e5b3267da49d1c4 Mon Sep 17 00:00:00 2001 | ||
| From: ItsHarper <git-f4cbe@harperandrews.org> | ||
| Date: Sun, 10 May 2026 13:11:03 -0400 | ||
| Subject: hardcode desktop file values | ||
|
|
||
| --- | ||
| crates/gram/resources/gram.desktop.in | 12 ++++++------ | ||
| 1 file changed, 6 insertions(+), 6 deletions(-) | ||
|
|
||
| diff --git a/crates/gram/resources/gram.desktop.in b/crates/gram/resources/gram.desktop.in | ||
| index 5daceabe7d..d95bcac27b 100644 | ||
| --- a/crates/gram/resources/gram.desktop.in | ||
| +++ b/crates/gram/resources/gram.desktop.in | ||
| @@ -1,13 +1,13 @@ | ||
| [Desktop Entry] | ||
| Version=1.0 | ||
| Type=Application | ||
| -Name=$APP_NAME | ||
| +Name=Gram | ||
| GenericName=Text Editor | ||
| Comment=A code editor for humanoid apes and grumpy toads | ||
| -TryExec=$APP_CLI | ||
| -StartupNotify=$DO_STARTUP_NOTIFY | ||
| -Exec=$APP_CLI $APP_ARGS | ||
| -Icon=$APP_ICON | ||
| +TryExec=gram | ||
| +StartupNotify=true | ||
| +Exec=gram %U | ||
| +Icon=app.liten.Gram | ||
| Categories=Utility;TextEditor;Development;IDE; | ||
| Keywords=gram; | ||
| # To add Gram to "Open Folder With..." context menu, add `inode/directory` to the MimeType field (semicolon separated) | ||
| @@ -18,5 +18,5 @@ Actions=NewWorkspace; | ||
| StartupWMClass=app.liten.Gram | ||
|
|
||
| [Desktop Action NewWorkspace] | ||
| -Exec=$APP_CLI --new $APP_ARGS | ||
| +Exec=gram --new %U | ||
| Name=Open a new workspace |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| From 08d6a96f2a899b4b32e564b4a19195750ef077f7 Mon Sep 17 00:00:00 2001 | ||
| From: ItsHarper <git-f4cbe@harperandrews.org> | ||
| Date: Sun, 10 May 2026 13:15:33 -0400 | ||
| Subject: show pkgrel on about modal | ||
|
|
||
| --- | ||
| crates/gram/src/gram.rs | 2 +- | ||
| 1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
|
||
| diff --git a/crates/gram/src/gram.rs b/crates/gram/src/gram.rs | ||
| index 980d86d417..c93f131269 100644 | ||
| --- a/crates/gram/src/gram.rs | ||
| +++ b/crates/gram/src/gram.rs | ||
| @@ -1052,7 +1052,7 @@ fn open_about(cx: &mut App) { | ||
|
|
||
| impl AboutWindow { | ||
| fn new(cx: &mut Context<Self>) -> Self { | ||
| - let version = env!("CARGO_PKG_VERSION"); | ||
| + let version = env!("RELEASE_VERSION"); | ||
| let debug = if cfg!(debug_assertions) { | ||
| "(debug)" | ||
| } else { | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| From eb416d52ac7ec898089f3040e8028814dec8f7ea Mon Sep 17 00:00:00 2001 | ||
| From: ItsHarper <git-f4cbe@harperandrews.org> | ||
| Date: Sun, 10 May 2026 13:17:06 -0400 | ||
| Subject: unbundle sqlite | ||
|
|
||
| --- | ||
| Cargo.toml | 2 +- | ||
| 1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
|
||
| diff --git a/Cargo.toml b/Cargo.toml | ||
| index fa2a8b128a..260244988d 100644 | ||
| --- a/Cargo.toml | ||
| +++ b/Cargo.toml | ||
| @@ -402,7 +402,7 @@ jupyter-protocol = "1.1.0" | ||
| jupyter-websocket-client = "1.0.0" | ||
| kdl = "6.5.0" | ||
| libc = "0.2" | ||
| -libsqlite3-sys = { version = "0.37", features = ["bundled"] } | ||
| +libsqlite3-sys = { version = "0.37" } | ||
| linkify = "0.11" | ||
| log = { version = "0.4.16", features = ["kv_unstable_serde", "serde"] } | ||
| lsp-types = { git = "https://github.com/zed-industries/lsp-types", rev = "b71ab4eeb27d9758be8092020a46fe33fbca4e33" } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| pkgname = "gram" | ||
| pkgver = "2.0.0" | ||
| pkgrel = 0 | ||
| build_style = "cargo" | ||
| make_env = { | ||
| "RELEASE_VERSION": f"{pkgver}-chimera-linux-r{pkgrel}", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. related to the above comment |
||
| "GRAM_UPDATE_EXPLANATION": "Update Gram using the apk package manager", | ||
| } | ||
| make_build_args = ["--package", "gram", "--package", "cli"] | ||
| make_check_args = [ | ||
| "--workspace", | ||
| "--exclude=ui_macros", | ||
| "--", | ||
| "--skip=repository::tests::test_checkpoint_basic", | ||
| "--skip=repository::tests::test_checkpoint_empty_repo", | ||
| "--skip=repository::tests::test_checkpoint_exclude_binary_files", | ||
| "--skip=repository::tests::test_compare_checkpoints", | ||
| "--skip=project_tests::test_file_status", | ||
| "--skip=project_tests::test_git_repository_status", | ||
| "--skip=project_tests::test_rename_work_directory", | ||
| "--skip=project_tests::test_staging_hunk_preserve_executable_permission", | ||
| "--skip=gram::tests::test_window_edit_state_restoring_enabled", | ||
| ] | ||
| hostmakedepends = [ | ||
| "cargo-auditable", | ||
| "cmake", | ||
| "pkgconf", | ||
| "protobuf-protoc", | ||
| "rust-bindgen", | ||
| ] | ||
| makedepends = [ | ||
| "alsa-lib-devel", | ||
| "libgit2-devel", | ||
| "libx11-devel", | ||
| "libxkbcommon-devel", | ||
| "openssl3-devel", | ||
| "sqlite-devel", | ||
| "zstd-devel", | ||
| ] | ||
| pkgdesc = "Code editor for humanoid apes and grumpy toads, forked from Zed" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Text editor forked from Zed |
||
| license = "GPL-3.0-only" | ||
| url = "https://gram-editor.com" | ||
| source = f"https://codeberg.org/GramEditor/gram/archive/{pkgver}.tar.gz" | ||
| sha256 = "091e2788a31261e76c01c272bdb9b4f53a3106a4c9e16dfa1318fb916e50e5bf" | ||
| # TODO(Harper): Patch message "Installation from source URL requires rustup to be installed" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should be a simple change in crates/extensions_ui/src/extension_suggest.rs |
||
| # TODO(Harper): Patch in extension compilation errors that explain which packages to install | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i don't think this is necessary |
||
|
|
||
|
|
||
| def install(self): | ||
| self.install_file( | ||
| f"target/{self.profile().triplet}/release/gram", | ||
| "usr/lib/gram", | ||
| name="gram-editor", | ||
| ) | ||
| self.install_bin( | ||
| f"target/{self.profile().triplet}/release/cli", | ||
| name="gram", | ||
| ) | ||
| self.install_file( | ||
| "crates/gram/resources/app-icon.png", | ||
| "usr/share/icons/hicolor/512x512/apps", | ||
| name="app.liten.Gram.png", | ||
| ) | ||
| self.install_file( | ||
| "crates/gram/resources/app-icon@2x.png", | ||
| "usr/share/icons/hicolor/1024x1024/apps", | ||
| name="app.liten.Gram.png", | ||
| ) | ||
|
Comment on lines
+59
to
+68
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please use the scalable app icon as in https://codeberg.org/GramEditor/gram/commit/76a368e0397a01141bbe7f7f13616cb70e5d8347#diff-89b78e428e295773d6e28127128e2a92d4beaea1 following upstream don't install the png ones as they are different follow the upstream naming as well, which will need adjustment for the |
||
| self.install_file( | ||
| "crates/gram/resources/gram.desktop.in", | ||
| "usr/share/applications", | ||
| name="app.liten.Gram.desktop", | ||
| ) | ||
| self.install_license("LICENSE-GPL") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's unnecessary to install the GPL |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this is solely about showing pkgrel, i don't think we need it and can drop it