diff --git a/.gitignore b/.gitignore
index 3b1d4a0e..eb28f067 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,4 +8,7 @@ container-images-uris.txt
container-images.txt
cached-container-images.tar
+# Flatpak
+.flatpak-builder
+
# vim: tw=100 colorcolumn=100
diff --git a/Cargo.toml b/Cargo.toml
index 34bf65fb..da4f2b45 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -9,6 +9,10 @@ build = "build.rs"
edition = "2018"
license = "GPLv3"
+[features]
+default = []
+flatpak = []
+
[dependencies]
clap = { version = "4.0", features = ["color", "help", "std", "usage", "error-context", "suggestions", "wrap_help", "derive"] }
glib = "0.18.0"
diff --git a/Makefile b/Makefile
index 73d0f2c5..44253ce5 100644
--- a/Makefile
+++ b/Makefile
@@ -4,28 +4,32 @@ test:
RUST_BACKTRACE=1 cargo test
run:
- RUST_LOG=warn RUST_BACKTRACE=1 cargo run -- --no-fork
+ RUST_LOG=warn RUST_BACKTRACE=1 cargo run $(CARGO_ARGS) -- --no-fork
install: install-resources
- cargo install --path . --force --root $(DESTDIR)$(PREFIX)
+ cargo install $(CARGO_ARGS) --path . --force --root $(DESTDIR)$(PREFIX)
+
+install-flatpak: install
+ mkdir -p /app/share/metainfo/
+ cp desktop/com.github.Lyude.neovim-gtk.metainfo.xml /app/share/metainfo/
install-debug: install-resources
- cargo install --debug --path . --force --root $(DESTDIR)$(PREFIX)
+ cargo install $(CARGO_ARGS) --debug --path . --force --root $(DESTDIR)$(PREFIX)
install-resources:
mkdir -p $(DESTDIR)$(PREFIX)/share/nvim-gtk/
cp -r runtime $(DESTDIR)$(PREFIX)/share/nvim-gtk/
mkdir -p $(DESTDIR)$(PREFIX)/share/applications/
sed -e "s|Exec=nvim-gtk|Exec=$(PREFIX)/bin/nvim-gtk|" \
- desktop/org.daa.NeovimGtk.desktop \
- >$(DESTDIR)$(PREFIX)/share/applications/org.daa.NeovimGtk.desktop
+ desktop/com.github.Lyude.neovim-gtk.desktop \
+ >$(DESTDIR)$(PREFIX)/share/applications/com.github.Lyude.neovim-gtk.desktop
mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
- cp desktop/org.daa.NeovimGtk_128.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/org.daa.NeovimGtk.png
+ cp desktop/com.github.Lyude.neovim-gtk_128.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/com.github.Lyude.neovim-gtk.png
mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
- cp desktop/org.daa.NeovimGtk_48.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/org.daa.NeovimGtk.png
+ cp desktop/com.github.Lyude.neovim-gtk_48.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/com.github.Lyude.neovim-gtk.png
mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
- cp desktop/org.daa.NeovimGtk.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
+ cp desktop/com.github.Lyude.neovim-gtk.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/symbolic/apps/
- cp desktop/org.daa.NeovimGtk-symbolic.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/symbolic/apps/
+ cp desktop/com.github.Lyude.neovim-gtk-symbolic.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/symbolic/apps/
.PHONY: all clean test
diff --git a/com.github.Lyude.neovim-gtk.yaml b/com.github.Lyude.neovim-gtk.yaml
new file mode 100644
index 00000000..b5ee2d14
--- /dev/null
+++ b/com.github.Lyude.neovim-gtk.yaml
@@ -0,0 +1,32 @@
+app-id: com.github.Lyude.neovim-gtk
+runtime: org.gnome.Platform
+runtime-version: '45'
+sdk: org.gnome.Sdk
+sdk-extensions:
+- org.freedesktop.Sdk.Extension.rust-stable
+command: nvim-gtk
+finish-args:
+- --share=ipc
+- --socket=fallback-x11
+- --socket=wayland
+- --device=dri
+- --socket=session-bus # for `flatpak-spawn --host nvim`
+build-options:
+ append-path: "/usr/lib/sdk/rust-stable/bin"
+ build-args:
+ - "--share=network" # for cargo fetching dependencies
+ env:
+ CARGO_HOME: "/run/build/neovim-gtk" # for caching
+ CARGO_ARGS: "--features flatpak"
+ PREFIX: "/app"
+modules:
+- name: neovim-gtk
+ buildsystem: simple
+ build-commands:
+ - make install-flatpak
+ sources:
+ - type: archive
+ #url: https://github.com/Lyude/neovim-gtk/archive/refs/tags/v1.0.4.tar.gz
+ #sha256: d0d0dacfbfca16168361f517dee20259785379910173cc33d7d48bd301d30f18
+ url: https://github.com/Lyude/neovim-gtk/archive/3739f961d28d2a7c98b1fd8be912fc4bb9d9d216.tar.gz
+ sha256: 78f0a12bdbf5d085fdbc0a57d877b695c5ae4873d036dd5e190141a927da2819
diff --git a/desktop/org.daa.NeovimGtk-symbolic.svg b/desktop/com.github.Lyude.neovim-gtk-symbolic.svg
similarity index 99%
rename from desktop/org.daa.NeovimGtk-symbolic.svg
rename to desktop/com.github.Lyude.neovim-gtk-symbolic.svg
index 3cc09cba..5bc45a4e 100644
--- a/desktop/org.daa.NeovimGtk-symbolic.svg
+++ b/desktop/com.github.Lyude.neovim-gtk-symbolic.svg
@@ -13,7 +13,7 @@
viewBox="0 0 212.20267 212.20267"
version="1.1"
id="svg27"
- sodipodi:docname="org.daa.NeovimGtk-symbolic.svg"
+ sodipodi:docname="com.github.Lyude.neovim-gtk-symbolic.svg"
inkscape:version="0.92.3 (2405546, 2018-03-11)">
GTK ui for neovim written in rust using gtk-rs bindings. With ligatures support. This project began as a fork of @daa84's neovim-gtk. There are a very large number of improvements from @daa84's version, including:
+
+
+