emacs24: fix build on darwin (clos #932)
This commit is contained in:
parent
5bfb4a4f30
commit
ad454f3511
|
@ -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 <<EOF
|
||||
;; nixos specific load-path
|
||||
|
@ -45,10 +49,16 @@ stdenv.mkDerivation rec {
|
|||
EOF
|
||||
'';
|
||||
|
||||
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "GNU Emacs 24, the extensible, customizable text editor";
|
||||
homepage = http://www.gnu.org/software/emacs/;
|
||||
license = licenses.gplv3Plus;
|
||||
maintainers = with maintainers; [ chaoflow lovek323 simons the-kenny ];
|
||||
platforms = platforms.all;
|
||||
|
||||
longDescription = ''
|
||||
GNU Emacs is an extensible, customizable text editor—and more. At its
|
||||
|
@ -66,11 +76,5 @@ EOF
|
|||
extensions are distributed with GNU Emacs; others are available
|
||||
separately.
|
||||
'';
|
||||
|
||||
homepage = "http://www.gnu.org/software/emacs/";
|
||||
license = "GPLv3+";
|
||||
|
||||
maintainers = with maintainers; [ chaoflow lovek323 simons the-kenny ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -7439,17 +7439,16 @@ let
|
|||
# use override to enable additional features
|
||||
libXaw = if stdenv.isDarwin then xlibs.libXaw else null;
|
||||
Xaw3d = null;
|
||||
gtk = if stdenv.isDarwin then null else gtk;
|
||||
gconf = null;
|
||||
librsvg = null;
|
||||
alsaLib = null;
|
||||
imagemagick = null;
|
||||
texinfo = texinfo5;
|
||||
|
||||
# use gccApple on darwin to deal with: unexec: 'my_edata is not in section
|
||||
# __data'
|
||||
# use clangStdenv on darwin to deal with: unexec: 'my_edata is not in
|
||||
# section __data'
|
||||
stdenv = if stdenv.isDarwin
|
||||
then stdenvAdapters.overrideGCC stdenv gccApple
|
||||
then clangStdenv
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue