emacs: only use patchelf on linux

This prevents building Emacs with X on Darwin.

Broken by 5af6e9f75e (#54916)
This commit is contained in:
Andrew Childs 2019-03-28 15:58:45 +09:00
parent b16b1b377b
commit 26e82e684c
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ stdenv.mkDerivation rec {
let libPath = lib.makeLibraryPath [
libXcursor
];
in lib.optionalString (withX && toolkit == "lucid") ''
in lib.optionalString (stdenv.isLinux && withX && toolkit == "lucid") ''
patchelf --set-rpath \
"$(patchelf --print-rpath "$out/bin/emacs"):${libPath}" \
"$out/bin/emacs"