1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 06:31:02 +00:00

kitty: patch paths to linux-specific libs on linux builds only

This commit is contained in:
Maximilian Bosch 2019-12-03 19:44:05 +01:00
parent bce914acba
commit 78f7187cd4
No known key found for this signature in database
GPG key ID: 091DBF4D1FC46B8E
3 changed files with 23 additions and 22 deletions

View file

@ -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";
})

View file

@ -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 @@

View file

@ -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";