From ad454f3511deadfaeaf0f5235b9be2d269e585d4 Mon Sep 17 00:00:00 2001 From: "Jason \\\"Don\\\" O'Conal" Date: Sat, 7 Sep 2013 10:28:03 +1000 Subject: [PATCH] emacs24: fix build on darwin (clos #932) --- .../applications/editors/emacs-24/default.nix | 36 ++++++++++--------- pkgs/top-level/all-packages.nix | 7 ++-- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/pkgs/applications/editors/emacs-24/default.nix b/pkgs/applications/editors/emacs-24/default.nix index bdb7c2a565a..ad42cc7cf33 100644 --- a/pkgs/applications/editors/emacs-24/default.nix +++ b/pkgs/applications/editors/emacs-24/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, ncurses, x11, libXaw, libXpm, Xaw3d , pkgconfig, gtk, libXft, dbus, libpng, libjpeg, libungif , libtiff, librsvg, texinfo, gconf, libxml2, imagemagick, gnutls -, alsaLib +, alsaLib, cairo , withX ? true }: @@ -14,27 +14,31 @@ stdenv.mkDerivation rec { builder = ./builder.sh; src = fetchurl { - url = "mirror://gnu/emacs/${name}.tar.xz"; + url = "mirror://gnu/emacs/${name}.tar.xz"; sha256 = "1385qzs3bsa52s5rcncbrkxlydkw0ajzrvfxgv8rws5fx512kakh"; }; buildInputs = [ ncurses gconf libxml2 gnutls alsaLib pkgconfig texinfo ] ++ stdenv.lib.optional stdenv.isLinux dbus - ++ stdenv.lib.optionals withX [ - x11 libXaw Xaw3d libXpm libpng libjpeg libungif - libtiff librsvg libXft imagemagick gtk - ]; + ++ stdenv.lib.optionals withX + [ x11 libXaw Xaw3d libXpm libpng libjpeg libungif libtiff librsvg libXft + imagemagick gtk ] + ++ stdenv.lib.optional stdenv.isDarwin cairo; configureFlags = - (if withX then - [ "--with-x-toolkit=gtk" "--with-xft"] - else - [ "--with-x=no --with-xpm=no --with-jpeg=no --with-png=no --with-gif=no --with-tiff=no" ]) + ( if withX then + [ "--with-x-toolkit=gtk" "--with-xft"] + else + [ "--with-x=no" "--with-xpm=no" "--with-jpeg=no" "--with-png=no" + "--with-gif=no" "--with-tiff=no" ] ) # On NixOS, help Emacs find `crt*.o'. ++ stdenv.lib.optional (stdenv ? glibc) [ "--with-crt-dir=${stdenv.glibc}/lib" ]; + NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.isDarwin && withX) + "-I${cairo}/include/cairo"; + postInstall = '' cat >$out/share/emacs/site-lisp/site-start.el <