emacs: Simplify patchelf invocation when building with lucid

This commit is contained in:
adisbladis 2022-08-22 21:55:31 +08:00
parent 15fe59e33a
commit 73c90badf3

View file

@ -204,15 +204,10 @@ let emacs = stdenv.mkDerivation (lib.optionalAttrs nativeComp {
-f batch-native-compile $out/share/emacs/site-lisp/site-start.el
'';
postFixup = lib.concatStringsSep "\n" [
(lib.optionalString (stdenv.isLinux && withX && toolkit == "lucid") ''
patchelf --set-rpath \
"$(patchelf --print-rpath "$out/bin/emacs"):${lib.makeLibraryPath [ libXcursor ]}" \
"$out/bin/emacs"
postFixup = lib.optionalString (stdenv.isLinux && withX && toolkit == "lucid") ''
patchelf --add-rpath ${lib.makeLibraryPath [ libXcursor ]} $out/bin/emacs
patchelf --add-needed "libXcursor.so.1" "$out/bin/emacs"
'')
];
'';
passthru = {
inherit nativeComp;