From 5af6e9f75e89dab40b2ac9cb9b0fe92cc66f1311 Mon Sep 17 00:00:00 2001 From: Piotr Bogdan Date: Thu, 17 Jan 2019 04:26:23 +0000 Subject: [PATCH] emacs: link libXcursor when using lucid toolkit --- pkgs/applications/editors/emacs/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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/;