diff --git a/pkgs/applications/misc/kitty/default.nix b/pkgs/applications/misc/kitty/default.nix index d5f5fceb0398..e4281ede89fe 100644 --- a/pkgs/applications/misc/kitty/default.nix +++ b/pkgs/applications/misc/kitty/default.nix @@ -64,8 +64,10 @@ buildPythonApplication rec { outputs = [ "out" "terminfo" ]; patches = [ + ./fix-paths.patch + ] ++ stdenv.lib.optionals stdenv.isLinux [ (substituteAll { - src = ./fix-paths.patch; + src = ./library-paths.patch; libstartup_notification = "${libstartup_notification}/lib/libstartup-notification-1.so"; libcanberra = "${libcanberra}/lib/libcanberra.so"; }) diff --git a/pkgs/applications/misc/kitty/fix-paths.patch b/pkgs/applications/misc/kitty/fix-paths.patch index 65c78d22a829..380f6d749146 100644 --- a/pkgs/applications/misc/kitty/fix-paths.patch +++ b/pkgs/applications/misc/kitty/fix-paths.patch @@ -1,24 +1,3 @@ ---- a/kitty/desktop.c -+++ b/kitty/desktop.c -@@ -30,7 +30,7 @@ - static PyObject* - init_x11_startup_notification(PyObject UNUSED *self, PyObject *args) { - static bool done = false; -- static const char* libname = "libstartup-notification-1.so"; -+ 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 @@ -3,7 +3,7 @@ diff --git a/pkgs/applications/misc/kitty/library-paths.patch b/pkgs/applications/misc/kitty/library-paths.patch new file mode 100644 index 000000000000..93c69b284846 --- /dev/null +++ b/pkgs/applications/misc/kitty/library-paths.patch @@ -0,0 +1,20 @@ +--- a/kitty/desktop.c ++++ b/kitty/desktop.c +@@ -30,7 +30,7 @@ + static PyObject* + init_x11_startup_notification(PyObject UNUSED *self, PyObject *args) { + static bool done = false; +- static const char* libname = "libstartup-notification-1.so"; ++ 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";