patx/twig

add snap metadata

Commit 25ecd4f · patx · 2026-06-14T21:35:33-04:00

Changeset
25ecd4f4cce3e9b9dfa518fac5ec201a30d8e31e
Parents
f4dc2c85f39834fda733bb051c3445bc71c7270c

View source at this commit

Comments

No comments yet.

Log in to comment

Diff

diff --git a/.gitignore b/.gitignore
index 9988ede..85d04e2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 __pycache__/
 *.py[cod]
 build/
+*.snap
diff --git a/.snapcraftignore b/.snapcraftignore
new file mode 100644
index 0000000..7cd09ea
--- /dev/null
+++ b/.snapcraftignore
@@ -0,0 +1,6 @@
+__pycache__/
+*.py[cod]
+.pytest_cache/
+build/
+dist/
+*.snap
diff --git a/Makefile b/Makefile
index 439c03a..c9e1c99 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,9 @@ DEB_ROOT ?= $(DEB_BUILD_DIR)/$(PACKAGE)
 DEB_FILE ?= dist/$(PACKAGE)_$(VERSION)_$(DEB_ARCH).deb
 DEB_CHANGELOG_DATE ?= $(shell date -R)
 
-.PHONY: install uninstall check deb clean-deb
+.PHONY: all install uninstall check deb clean-deb
+
+all:
 
 install:
 	install -Dm755 twig.py "$(DESTDIR)$(BINDIR)/twig"
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
new file mode 100644
index 0000000..fde3126
--- /dev/null
+++ b/snap/snapcraft.yaml
@@ -0,0 +1,50 @@
+name: twig
+title: Twig
+summary: Lightweight GTK code editor
+description: |
+  Twig is a small GTK code editor intended for lightweight Linux desktops.
+  It focuses on the basics: one file per window, open/save, syntax
+  highlighting, line numbers, find/replace, undo/redo, dirty indicators,
+  and save-before-close prompts.
+
+version: "0.1.1"
+base: core24
+grade: stable
+confinement: strict
+license: MIT
+icon: icons/hicolor/512x512/apps/twig.png
+website: https://gitman.io/patx/twig
+source-code: https://github.com/patx/twig
+issues: https://github.com/patx/twig/issues
+contact: [email protected]
+
+platforms:
+  amd64:
+  arm64:
+
+apps:
+  twig:
+    command: usr/bin/twig
+    desktop: usr/share/applications/twig.desktop
+    extensions: [gnome]
+    plugs:
+      - desktop
+      - desktop-legacy
+      - home
+      - removable-media
+      - wayland
+      - x11
+
+parts:
+  twig:
+    plugin: make
+    source: .
+    make-parameters:
+      - PREFIX=/usr
+    stage-packages:
+      - python3
+      - python3-gi
+      - gir1.2-gtk-3.0
+      - gir1.2-gtksource-4
+      - libgtksourceview-4-0
+      - shared-mime-info