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:
parent
bce914acba
commit
78f7187cd4
|
@ -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";
|
||||
})
|
||||
|
|
|
@ -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 @@
|
||||
|
|
20
pkgs/applications/misc/kitty/library-paths.patch
Normal file
20
pkgs/applications/misc/kitty/library-paths.patch
Normal 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";
|
Loading…
Reference in a new issue