Repository: espanso/espanso (language: rust)

Issue:
package install fails on debian trixie
**Logs**

```
The following packages have unmet dependencies:
 espanso-wayland : Depends: libwxgtk3.0-gtk3-0v5 but it is not installable
                   Depends: libwxgtk3.0-gtk3-0v5 (>= 3.0.4+dfsg) but it is not installable
                   Depends: libwxbase3.0-0v5 (>= 3.0.4+dfsg) but it is not installable
E: Unable to correct problems, you have held broken packages.
```

**Setup information**
- OS: What OS are you using? debian trixie (testing)
- Version: which version of Espanso are you running? attempting to install 2.1.8

**Analysis**

the issue is that debian does not have these versions of wx any longer:

```
$ apt search '^libwx(base|gtk3)'
Sorting... Done
Full Text Search... Done
libwxbase3.2-1/testing,unstable,now 3.2.2+dfsg-2 amd64 [installed,automatic]
  wxBase library (runtime) - non-GUI support classes of wxWidgets toolkit

libwxgtk3.2-1/testing,unstable,now 3.2.2+dfsg-2 amd64 [installed,automatic]
  wxWidgets Cross-platform C++ GUI toolkit (GTK 3 runtime)

libwxgtk3.2-dev/testing,unstable,now 3.2.2+dfsg-2 amd64 [installed,automatic]
  wxWidgets Cross-platform C++ GUI toolkit (GTK 3 development)
```

however, this seems to be more than simply a packaging issue. when i extract the deb and manually execute the binary, it fails because it is linked to `libwx_gtk3u_html-3.0.so` which doesn't exist on my system. i'm not sure if there were breaking APi changes between these versions of libgtk.


Discussion / hints:
I ran into the same problem and got around it by manually compiling and installing libwxgtk3.2-dev instead of libwxgtk3.0-gtk3-dev

Fix patch:
diff --git a/Compilation.md b/Compilation.md
index 585dde87..bb002b24 100644
--- a/Compilation.md
+++ b/Compilation.md
@@ -72,19 +72,22 @@ This will create the `Espanso.app` bundle in the `target/mac` directory.
 
 # Linux
 
-Espanso on Linux comes in two different flavors: one for X11 and one for Wayland. 
+Espanso on Linux comes in two different flavors: one for X11 and one for Wayland.
 If you don't know which one to choose, follow these steps to determine which one you are running: https://unix.stackexchange.com/a/325972
 
 ## Compiling for X11
 
 ### Necessary packages
 
-If compiling on Ubuntu X11:
+If compiling on a version of Ubuntu X11 before 22.04 (including 22.04):
 * `sudo apt install libx11-dev libxtst-dev libxkbcommon-dev libdbus-1-dev libwxgtk3.0-gtk3-dev`
 
+If compiling on a version of Ubuntu X11 after 22.04:
+* `sudo apt install libx11-dev libxtst-dev libxkbcommon-dev libdbus-1-dev libwxgtk3.2-dev`
+
 ### AppImage
 
-The AppImage is a convenient format to distribute Linux applications, as besides the binary, 
+The AppImage is a convenient format to distribute Linux applications, as besides the binary,
 it also bundles all the required libraries.
 
 You can create the AppImage by running (this will work on X11 systems):
diff --git a/espanso/Cargo.toml b/espanso/Cargo.toml
index e80ae0e0..5efb1e42 100644
--- a/espanso/Cargo.toml
+++ b/espanso/Cargo.toml
@@ -27,20 +27,20 @@ wayland = ["espanso-detect/wayland", "espanso-inject/wayland", "espanso-clipboar
 modulo = ["espanso-modulo", "espanso-clipboard/avoid-gdi", "espanso-ui/avoid-gdi"]
 
 [dependencies]
-espanso-detect = { path = "../espanso-detect" } 
-espanso-ui = { path = "../espanso-ui" } 
-espanso-inject = { path = "../espanso-inject" } 
-espanso-config = { path = "../espanso-config" } 
-espanso-match = { path = "../espanso-match" } 
-espanso-clipboard = { path = "../espanso-clipboard" } 
-espanso-info = { path = "../espanso-info" } 
-espanso-render = { path = "../espanso-render" } 
-espanso-path = { path = "../espanso-path" } 
-espanso-ipc = { path = "../espanso-ipc" } 
+espanso-detect = { path = "../espanso-detect" }
+espanso-ui = { path = "../espanso-ui" }
+espanso-inject = { path = "../espanso-inject" }
+espanso-config = { path = "../espanso-config" }
+espanso-match = { path = "../espanso-match" }
+espanso-clipboard = { path = "../espanso-clipboard" }
+espanso-info = { path = "../espanso-info" }
+espanso-render = { path = "../espanso-render" }
+espanso-path = { path = "../espanso-path" }
+espanso-ipc = { path = "../espanso-ipc" }
 espanso-modulo = { path = "../espanso-modulo", optional = true }
-espanso-migrate = { path = "../espanso-migrate" } 
-espanso-kvs = { path = "../espanso-kvs" } 
-espanso-engine = { path = "../espanso-engine" } 
+espanso-migrate = { path = "../espanso-migrate" }
+espanso-kvs = { path = "../espanso-kvs" }
+espanso-engine = { path = "../espanso-engine" }
 espanso-package = { path = "../espanso-package"}
 maplit = "1.0.2"
 simplelog = "0.9.0"
@@ -75,7 +75,7 @@ widestring = "0.4.3"
 libc = "0.2.98"
 
 [target.'cfg(target_os="macos")'.dependencies]
-espanso-mac-utils = { path = "../espanso-mac-utils" } 
+espanso-mac-utils = { path = "../espanso-mac-utils" }
 
 [target.'cfg(target_os="linux")'.dependencies]
 caps = "0.5.2"
@@ -84,12 +84,12 @@ regex = "1.5.5"
 
 [package.metadata.deb]
 maintainer = "Federico Terzi <federicoterzi96@gmail.com>"
-depends = "$auto, systemd, libxtst6, xclip, libnotify-bin, libxkbcommon0, libwxgtk3.0-gtk3-0v5"
+depends = "libc6 (>= 2.27), libdbus-1-3 (>= 1.9.14), libgcc1 (>= 1:4.2), libnotify-bin, libstdc++6 (>=6), libwxgtk3.0-gtk3-0v5 (>= 3.0.4+dfsg) | libwxgtk3.2-1, libx11-6, libxcb1, libxkbcommon0 (>= 0.5.0), libxtst6, systemd, xclip"
 section = "utility"
 license-file = ["../LICENSE", "1"]
 
 [package.metadata.deb.variants.wayland]
-depends = "$auto, systemd, libnotify-bin, libxkbcommon0, libwxgtk3.0-gtk3-0v5, wl-clipboard"
-# TODO: once this issue [1] is fixed, we should create a variant for 
+depends = "libc6 (>= 2.27), libdbus-1-3 (>= 1.9.14), libgcc1 (>= 1:4.2), libnotify-bin, libstdc++6 (>= 5), libwxgtk3.0-gtk3-0v5 (>= 3.0.4+dfsg) | libwxgtk3.2-1, libxkbcommon0 (>= 0.5.0), systemd, wl-clipboard"
+# TODO: once this issue [1] is fixed, we should create a variant for
 # wayland to automatically run the setcap script.
 # [1]: https://github.com/mmstick/cargo-deb/issues/151


Test patch: