Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kitty: fix loading of library #74874

Merged
merged 2 commits into from Dec 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion pkgs/applications/misc/kitty/default.nix
Expand Up @@ -64,9 +64,12 @@ 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";
Ma27 marked this conversation as resolved.
Show resolved Hide resolved
})
] ++ stdenv.lib.optionals stdenv.isDarwin [
./no-lto.patch
Expand Down
11 changes: 0 additions & 11 deletions pkgs/applications/misc/kitty/fix-paths.patch
@@ -1,14 +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";

--- a/docs/Makefile
+++ b/docs/Makefile
@@ -3,7 +3,7 @@
Expand Down
20 changes: 20 additions & 0 deletions 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";