kitty: fix loading of library

When trying to play a sound, kitty prints an error message because it cannot find `libcanberra.so`:
```
Failed to load libcanberra.so, cannot play beep sound, with error: libcanberra.so.0.2.5: cannot open shared object file: No such file or directory
```
This is fixed by patching the path to the library.
This commit is contained in:
Luflosi 2019-12-02 23:57:38 +01:00
parent ae323f8566
commit bce914acba
No known key found for this signature in database
GPG Key ID: 4E41E29EDCC345D0
2 changed files with 11 additions and 0 deletions

View File

@ -67,6 +67,7 @@ buildPythonApplication rec {
(substituteAll {
src = ./fix-paths.patch;
libstartup_notification = "${libstartup_notification}/lib/libstartup-notification-1.so";
libcanberra = "${libcanberra}/lib/libcanberra.so";
})
] ++ stdenv.lib.optionals stdenv.isDarwin [
./no-lto.patch

View File

@ -8,6 +8,16 @@
+ static const char* libname = "@libstartup_notification@";
// some installs are missing the .so symlink, so try the full name
static const char* libname2 = "libstartup-notification-1.so.0";
static const char* libname3 = "libstartup-notification-1.so.0.0.0";
@@ -105,7 +105,7 @@ load_libcanberra_functions(void) {
static void
load_libcanberra(void) {
- static const char* libname = "libcanberra.so";
+ static const char* libname = "@libcanberra@";
// some installs are missing the .so symlink, so try the full name
static const char* libname2 = "libcanberra.so.0";
static const char* libname3 = "libcanberra.so.0.2.5";
--- a/docs/Makefile
+++ b/docs/Makefile