about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorPiotr Bogdan <ppbogdan@gmail.com>2019-01-17 04:26:23 +0000
committerPiotr Bogdan <ppbogdan@gmail.com>2019-01-30 16:21:06 +0000
commit5af6e9f75e89dab40b2ac9cb9b0fe92cc66f1311 (patch)
tree503a49a0e690c2ee2b0a4a7dd14735671cebb0f5 /pkgs/applications
parent872502aa56bd4d574fcfe9cfef9066c9e8ee2894 (diff)
downloadnixlib-5af6e9f75e89dab40b2ac9cb9b0fe92cc66f1311.tar
nixlib-5af6e9f75e89dab40b2ac9cb9b0fe92cc66f1311.tar.gz
nixlib-5af6e9f75e89dab40b2ac9cb9b0fe92cc66f1311.tar.bz2
nixlib-5af6e9f75e89dab40b2ac9cb9b0fe92cc66f1311.tar.lz
nixlib-5af6e9f75e89dab40b2ac9cb9b0fe92cc66f1311.tar.xz
nixlib-5af6e9f75e89dab40b2ac9cb9b0fe92cc66f1311.tar.zst
nixlib-5af6e9f75e89dab40b2ac9cb9b0fe92cc66f1311.zip
emacs: link libXcursor when using lucid toolkit
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/editors/emacs/default.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/pkgs/applications/editors/emacs/default.nix b/pkgs/applications/editors/emacs/default.nix
index 948d8cb98672..2924d332f365 100644
--- a/pkgs/applications/editors/emacs/default.nix
+++ b/pkgs/applications/editors/emacs/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, ncurses, xlibsWrapper, libXaw, libXpm, Xaw3d
+{ stdenv, lib, fetchurl, ncurses, xlibsWrapper, libXaw, libXpm, Xaw3d, libXcursor
 , pkgconfig, gettext, libXft, dbus, libpng, libjpeg, libungif
 , libtiff, librsvg, gconf, libxml2, imagemagick, gnutls, libselinux
 , alsaLib, cairo, acl, gpm, cf-private, AppKit, GSS, ImageIO, m17n_lib, libotf
@@ -117,6 +117,17 @@ stdenv.mkDerivation rec {
     mv nextstep/Emacs.app $out/Applications
   '';
 
+  postFixup =
+    let libPath = lib.makeLibraryPath [
+      libXcursor
+    ];
+    in lib.optionalString (withX && toolkit == "lucid") ''
+      patchelf --set-rpath \
+        "$(patchelf --print-rpath "$out/bin/emacs"):${libPath}" \
+        "$out/bin/emacs"
+      patchelf --add-needed "libXcursor.so.1" "$out/bin/emacs"
+    '';
+
   meta = with stdenv.lib; {
     description = "The extensible, customizable GNU text editor";
     homepage    = https://www.gnu.org/software/emacs/;