Merge pull request #48747 from vlaci/master
kitty: fix locating libstartup-notification-1
This commit is contained in:
commit
52ad76f074
@ -1,5 +1,5 @@
|
|||||||
{ stdenv, fetchFromGitHub, python3Packages, glfw, libunistring, harfbuzz,
|
{ stdenv, substituteAll, fetchFromGitHub, python3Packages, glfw, libunistring,
|
||||||
fontconfig, pkgconfig, ncurses, imagemagick, xsel,
|
harfbuzz, fontconfig, pkgconfig, ncurses, imagemagick, xsel,
|
||||||
libstartup_notification, libX11, libXrandr, libXinerama, libXcursor,
|
libstartup_notification, libX11, libXrandr, libXinerama, libXcursor,
|
||||||
libxkbcommon, libXi, libXext, wayland-protocols, wayland,
|
libxkbcommon, libXi, libXext, wayland-protocols, wayland,
|
||||||
which, dbus
|
which, dbus
|
||||||
@ -28,14 +28,12 @@ buildPythonApplication rec {
|
|||||||
|
|
||||||
outputs = [ "out" "terminfo" ];
|
outputs = [ "out" "terminfo" ];
|
||||||
|
|
||||||
postPatch = ''
|
patches = [
|
||||||
substituteInPlace kitty/utils.py \
|
(substituteAll {
|
||||||
--replace "find_library('startup-notification-1')" "'${libstartup_notification}/lib/libstartup-notification-1.so'"
|
src = ./fix-paths.patch;
|
||||||
|
libstartup_notification = "${libstartup_notification}/lib/libstartup-notification-1.so";
|
||||||
substituteInPlace docs/Makefile \
|
})
|
||||||
--replace 'python3 .. +launch :sphinx-build' \
|
];
|
||||||
'PYTHONPATH=$PYTHONPATH:.. HOME=$TMPDIR/nowhere sphinx-build'
|
|
||||||
'';
|
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
python3 setup.py linux-package
|
python3 setup.py linux-package
|
||||||
|
27
pkgs/applications/misc/kitty/fix-paths.patch
Normal file
27
pkgs/applications/misc/kitty/fix-paths.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
--- 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@";
|
||||||
|
if (!done) {
|
||||||
|
done = true;
|
||||||
|
|
||||||
|
--- a/docs/Makefile
|
||||||
|
+++ b/docs/Makefile
|
||||||
|
@@ -3,7 +3,7 @@
|
||||||
|
# Patching is needed here for the following reasons:
|
||||||
|
# * `sphinx-build` in nixpkgs is not a Python file but a wrapper shell script
|
||||||
|
# * importing the `constants` package from Kitty has a side effect that it
|
||||||
|
# creates the user configuration directory. This package gets imported
|
||||||
|
# while sphinx scans the code for documentation strings.
|
||||||
|
#
|
||||||
|
# You can set these variables from the command line.
|
||||||
|
SPHINXOPTS = -T $(FAIL_WARN)
|
||||||
|
-SPHINXBUILD = python3 .. +launch :sphinx-build
|
||||||
|
+SPHINXBUILD = PYTHONPATH=${PYTHONPATH}:.. HOME=${TMPDIR}/kitty-build-home sphinx-build
|
||||||
|
SPHINXPROJ = kitty
|
||||||
|
SOURCEDIR = .
|
||||||
|
BUILDDIR = _build
|
Loading…
x
Reference in New Issue
Block a user